> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive an accounting entry

> Set an entry aside so it's never synced. A record already on the accounting platform stays there.



## OpenAPI

````yaml /openapi-v2.json post /v2/accounting/entries/{entryId}/archive
openapi: 3.1.0
info:
  title: Slash Public API V2
  description: >-
    Send money for a Slash legal entity. Every request uses an API key. Transfer
    creation returns a Transfer that links its resulting transactions.
  version: 0.0.1
servers:
  - url: https://api.slash.com
    description: production
security:
  - api_key: []
paths:
  /v2/accounting/entries/{entryId}/archive:
    parameters:
      - name: x-legal-entity
        in: header
        required: true
        description: >-
          The legal entity to act on. Required on every request; a user API key
          can act on any legal entity its user has access to.
        schema:
          type: string
          pattern: ^le_[a-zA-Z0-9]+$
      - name: entryId
        in: path
        required: true
        description: Entry id with the `accounting_entry_` prefix.
        schema:
          type: string
    post:
      summary: Archive an accounting entry
      description: >-
        Set an entry aside so it's never synced. A record already on the
        accounting platform stays there.
      responses:
        '200':
          description: The entry, now `archived`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accounting-entry'
        '400':
          $ref: '#/components/responses/PublicApiV2Error400AccountingEntriesArchive'
        '401':
          $ref: '#/components/responses/PublicApiV2Error401Unauthorized'
        '403':
          $ref: >-
            #/components/responses/PublicApiV2Error403ForbiddenForbiddenLegalEntityNotAvailableUserApiKeyRequired
        '404':
          $ref: '#/components/responses/PublicApiV2Error404AccountingEntriesArchive'
        '409':
          $ref: >-
            #/components/responses/PublicApiV2Error409BillPaymentEntryReadOnlyEntrySyncInProgress
        '429':
          $ref: '#/components/responses/PublicApiV2RateLimited'
        '500':
          $ref: '#/components/responses/PublicApiV2Error500Internal'
      security:
        - api_key: []
components:
  schemas:
    accounting-entry:
      title: AccountingEntry
      description: >-
        The accounting record for one settled transaction (or group of related
        transactions) or one bill. An entry is created automatically when its
        source settles, coded with dimensions on its line items, and then synced
        to the connected platform. `status` tracks that lifecycle.
      type: object
      properties:
        id:
          type: string
          description: Entry id with the `accounting_entry_` prefix.
          example: accounting_entry_2rj4l7hmrrrcv
        connectionId:
          type: string
          description: The accounting connection the entry belongs to.
          example: accounting_connection_2rj4l7hmrrrcv
        type:
          type: string
          description: >-
            What the entry represents on the platform. `expense_card` and
            `expense_card_refund` come from card transactions; `bank_transfer`,
            `bank_deposit`, and `expense` from account transactions;
            `journal_entry` from transactions posted as journals; `bill` is the
            accounts-payable bill and `bill_payment` the transaction that
            settles one. `unknown` entries have not yet been classified.
          enum:
            - unknown
            - expense
            - bank_transfer
            - bank_deposit
            - journal_entry
            - expense_card
            - expense_card_refund
            - bill_payment
            - bill
        status:
          type: string
          description: >-
            `in_review` until a user or rule marks it ready; `ready_to_sync`
            when coding is complete; `pending_sync` and `syncing` while a sync
            is queued or in flight; `synced` once the platform holds it;
            `failed` when the platform rejected it (see `lastSyncError`);
            `archived` when excluded from the books.
          enum:
            - in_review
            - ready_to_sync
            - pending_sync
            - syncing
            - synced
            - archived
            - failed
        statusUpdatedAt:
          type: string
          format: date-time
          description: When `status` last changed.
          example: '2026-09-19T14:05:22.000Z'
        date:
          type: string
          format: date
          description: >-
            Accounting date as `YYYY-MM-DD`: the settlement date of the source
            transaction or the invoice date of the bill.
          example: '2026-09-18'
        memo:
          type: string
          description: Memo sent to the platform.
          example: AWS hosting, September
        amount:
          $ref: '#/components/schemas/Money'
          description: >-
            Net amount in minor units. Negative for money leaving the account
            (expenses, bill payments) and positive for money arriving. On a
            bill's entry it is the bill's total, which is positive.
        source:
          type: object
          description: What the entry was created from.
          properties:
            type:
              type: string
              description: >-
                `transaction` entries reference a transaction; `bill` entries
                reference a bill from `GET /v2/bills/{billId}`.
              enum:
                - transaction
                - bill
            id:
              type: string
              description: >-
                The transaction (`agg_tx_`) or bill (`bill_`) id. For
                transaction entries it is one of `transactionIds`.
              example: agg_tx_2rj4l7hmrrrcv
          required:
            - type
            - id
          additionalProperties: false
        transactionIds:
          type: array
          description: >-
            Every transaction the entry covers. Usually one; internal transfers
            and card repayments combine two.
          items:
            type: string
          example:
            - agg_tx_2rj4l7hmrrrcv
        lineItems:
          type: array
          description: Ordered `fixed` lines first, then `editable` lines by `splitIndex`.
          items:
            $ref: '#/components/schemas/accounting-line-item'
        lineItemLevelDimensions:
          type: array
          description: >-
            For `bill` entries, the dimension keys coded per line item.
            Dimensions not listed take the same value on every line. Empty for
            transaction entries.
          items:
            type: string
          example:
            - account
            - class
        entryLevelDimensions:
          type: array
          description: >-
            Dimension keys the platform records once per entry rather than per
            line item. Every line item carries the same value for these, and a
            split cannot code them differently across its lines.
          items:
            type: string
          example:
            - department
        unsupportedDimensions:
          type: array
          description: >-
            Dimension keys the platform does not accept for this entry `type`.
            Any value set on them is dropped at sync time.
          items:
            type: string
          example:
            - customer
        customFields:
          type: object
          description: >-
            Raw values of entry level custom fields, keyed by the field's
            `fieldKey` from `GET /v2/accounting/dimensions`.
          additionalProperties: true
          example:
            cf_approved_by: jane@acme.com
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/accounting-attachment'
        externalId:
          type: string
          description: >-
            The platform's id for the synced record. Present once `status` is
            `synced`.
          example: '1234'
        externalUrl:
          type: string
          format: uri
          description: >-
            A link to the record in the platform, when the platform provides
            one.
          example: https://app.qbo.intuit.com/app/expense?txnId=1234
        lastSyncError:
          type: object
          description: >-
            Why the most recent sync attempt failed. Present while `status` is
            `failed`.
          properties:
            code:
              type: string
              description: >-
                Snake_case code from Slash's accounting error catalog, or
                `sync_error` when the failure isn't one Slash recognizes.
              example: qbo_invalid_account_type
            message:
              type: string
              description: >-
                What went wrong, in words you can show a user. For unrecognized
                failures this is the platform's own explanation when it gives
                one.
              example: >-
                The selected account type cannot be used for this type of
                transaction.
            title:
              type: string
              description: Short summary of the failure.
              example: Invalid account type
            suggestion:
              type: string
              description: How to fix it.
              example: >-
                Use an Expense, Cost of Goods Sold, or Other Current Asset type
                account instead.
          required:
            - code
            - message
            - title
            - suggestion
          additionalProperties: false
        createdAt:
          type: string
          format: date-time
          example: '2026-09-18T20:11:02.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-09-19T14:05:22.000Z'
      required:
        - id
        - connectionId
        - type
        - status
        - statusUpdatedAt
        - date
        - amount
        - source
        - transactionIds
        - lineItems
        - lineItemLevelDimensions
        - entryLevelDimensions
        - unsupportedDimensions
        - customFields
        - attachments
        - createdAt
        - updatedAt
      additionalProperties: false
    Money:
      type: object
      description: A signed monetary amount expressed in minor units.
      properties:
        amount:
          type: integer
          description: Amount in the currency's minor units.
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          description: Uppercase ISO 4217 currency code.
      required:
        - amount
        - currency
      additionalProperties: false
      title: Money
    accounting-line-item:
      title: AccountingLineItem
      description: >-
        One line of an accounting entry. Entries always carry at least one
        `fixed` line (the bank or credit-card account the money moved through,
        or the accounts-payable account on a bill) and one or more `editable`
        lines that hold the coding. Splitting an entry produces several
        `editable` lines.
      type: object
      properties:
        id:
          type: string
          description: Line item id with the `accounting_line_item_` prefix.
          example: accounting_line_item_2rj4l7hmrrrcv
        type:
          type: string
          description: >-
            `fixed` lines are set by Slash from the connection's account
            mappings and cannot be recoded. `editable` lines carry the
            dimensions you code.
          enum:
            - fixed
            - editable
        amount:
          $ref: '#/components/schemas/Money'
          description: >-
            Signed amount in minor units. Debits are positive and credits
            negative, so the lines of an entry sum to zero.
        description:
          type: string
          description: Line memo sent to the platform.
          example: AWS hosting
        splitIndex:
          type: integer
          description: >-
            Position of the line among the entry's `editable` lines; `0` for
            unsplit entries.
          example: 0
        transactionId:
          type: string
          description: >-
            For transaction entries, the transaction this line settles. Entries
            that combine several transactions carry one `fixed` line per
            transaction.
          example: agg_tx_2rj4l7hmrrrcv
        dimensions:
          type: object
          description: >-
            The line's coding, keyed by dimension key (see `GET
            /v2/accounting/dimensions`). Only dimensions with a value are
            present.
          additionalProperties:
            type: object
            properties:
              id:
                type: string
                description: The dimension value id.
                example: accounting_account_2rj4l7hmrrrcv
              name:
                type: string
                description: The value's display name at read time.
                example: 6100 Software Subscriptions
            required:
              - id
            additionalProperties: false
          example:
            account:
              id: accounting_account_2rj4l7hmrrrcv
              name: 6100 Software Subscriptions
            class:
              id: accounting_class_3sk5m8inssscw
              name: Engineering
        customFields:
          type: object
          description: >-
            Raw values of line-item level custom fields, keyed by the field's
            `fieldKey` from `GET /v2/accounting/dimensions`. Value type follows
            the field's `fieldType`: strings, numbers, booleans, or arrays of
            option values for `multiselect`.
          additionalProperties: true
          example:
            cf_cost_center: CC-100
      required:
        - id
        - type
        - amount
        - splitIndex
        - dimensions
        - customFields
      additionalProperties: false
    accounting-attachment:
      title: AccountingAttachment
      description: >-
        A document attached to an accounting entry and pushed to the platform as
        a receipt or bill image. Download the file through `GET
        /v2/documents/{documentId}`.
      type: object
      properties:
        id:
          type: string
          description: Attachment id with the `accounting_attachment_` prefix.
          example: accounting_attachment_2rj4l7hmrrrcv
        documentId:
          type: string
          description: The underlying document.
          example: st_2rj4l7hmrrrcv
        filename:
          type: string
          example: receipt-4471.pdf
        contentType:
          type: string
          description: MIME type of the file.
          example: application/pdf
        status:
          type: string
          description: >-
            `pending_sync` until the entry has synced and the file has been
            pushed; `synced` once the platform holds a copy; `failed` when the
            push was rejected.
          enum:
            - pending_sync
            - synced
            - failed
      required:
        - id
        - documentId
        - filename
        - status
      additionalProperties: false
    PublicApiV2ErrorInvalidRequestShape:
      title: PublicApiV2ErrorInvalidRequestShape
      description: >-
        The body, query, or headers failed validation, or a required header is
        missing. `details` has one entry per failing location, keyed by JSON
        pointer or header name.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - invalid_request
            details:
              type: object
              properties: {}
              additionalProperties:
                type: string
          required:
            - code
            - details
    PublicApiV2ErrorUnauthorized:
      title: PublicApiV2ErrorUnauthorized
      description: API key authentication is missing or invalid.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
            details:
              type: object
              properties: {}
              additionalProperties: false
          required:
            - code
            - details
    PublicApiV2ErrorForbidden:
      title: PublicApiV2ErrorForbidden
      description: >-
        The credential is not permitted to perform this action on the resource.
        When the resource is a field of the request, `details` names that
        `field` and the `id` it received.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - forbidden
            details:
              type: object
              properties:
                field:
                  type: string
                  description: Dot path of the request field at fault.
                id:
                  type: string
                  description: The identifier that field carried, when it is one.
              additionalProperties: false
          required:
            - code
            - details
    PublicApiV2ErrorForbiddenLegalEntity:
      title: PublicApiV2ErrorForbiddenLegalEntity
      description: The credential is not permitted to act for the selected legal entity.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - forbidden
            details:
              type: object
              properties: {}
              additionalProperties: false
          required:
            - code
            - details
    PublicApiV2ErrorNotAvailable:
      title: PublicApiV2ErrorNotAvailable
      description: >-
        Public API v2 is not yet available. Use [Public API
        v1](https://docs.slash.com/introduction) in the meantime.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - not_available
            details:
              type: object
              properties: {}
              additionalProperties: false
          required:
            - code
            - details
    PublicApiV2ErrorUserApiKeyRequired:
      title: PublicApiV2ErrorUserApiKeyRequired
      description: >-
        The API key is scoped to a legal entity rather than a user. Every v2
        request needs a user API key, created under Settings → API keys in the
        Slash dashboard, together with the `x-legal-entity` header.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - user_api_key_required
            details:
              type: object
              properties: {}
              additionalProperties: false
          required:
            - code
            - details
    PublicApiV2ErrorNotFound:
      title: PublicApiV2ErrorNotFound
      description: >-
        No resource matches the identifier. When the identifier is a field of
        the request, `details` names that `field` and the `id` it received.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - not_found
            details:
              type: object
              properties:
                field:
                  type: string
                  description: Dot path of the request field at fault.
                id:
                  type: string
                  description: The identifier that field carried, when it is one.
              additionalProperties: false
          required:
            - code
            - details
    PublicApiV2ErrorBillPaymentEntryReadOnly:
      title: PublicApiV2ErrorBillPaymentEntryReadOnly
      description: >-
        Bill payment entries take their coding from the bill they pay. Code the
        bill’s entry instead.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - bill_payment_entry_read_only
            details:
              type: object
              properties: {}
              additionalProperties: false
          required:
            - code
            - details
    PublicApiV2ErrorEntrySyncInProgress:
      title: PublicApiV2ErrorEntrySyncInProgress
      description: >-
        The entry is `pending_sync` or `syncing`. Retry once a read of the entry
        shows `synced` or `failed`.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - entry_sync_in_progress
            details:
              type: object
              properties:
                status:
                  type: string
                  description: The entry’s current `status`.
                  example: syncing
              required:
                - status
              additionalProperties: false
          required:
            - code
            - details
    PublicApiV2ErrorInternal:
      title: PublicApiV2ErrorInternal
      description: >-
        Slash could not complete the request. Quote `referenceId` when
        contacting Slash support.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - internal
            details:
              type: object
              properties: {}
              additionalProperties: false
          required:
            - code
            - details
    Error:
      type: object
      properties:
        code:
          type: string
          description: >-
            Machine-readable reason; branch on this, not on `message`. Every
            code an endpoint can return is listed on its reference page; the
            ones shared by all endpoints are explained in the Errors guide.
          example: invalid_request
        message:
          type: string
          description: >-
            Human-readable explanation, safe to show to an operator. Wording may
            change; use `code` and `details` programmatically.
        details:
          type: object
          description: >-
            The values behind `message`, keyed per `code`. For example
            `insufficient_funds` carries `available` and `requested`;
            `invalid_request` from contract validation carries one entry per
            failing field, keyed by JSON pointer. Empty when the code has no
            variable data.
          additionalProperties:
            type: string
          example:
            available: $120.00
            requested: $500.00
        referenceId:
          type: string
          description: Unique id of this failure. Quote it when contacting Slash support.
          example: 4001-2alj5if
      required:
        - code
        - message
        - details
        - referenceId
      additionalProperties: false
      title: Error
  responses:
    PublicApiV2Error400AccountingEntriesArchive:
      description: >-
        - `invalid_request (request shape)` — The body, query, or headers failed
        validation, or a required header is missing. `details` has one entry per
        failing location, keyed by JSON pointer or header name.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiV2ErrorInvalidRequestShape'
          examples:
            invalid_request_request_shape:
              summary: invalid_request (request shape)
              value:
                code: invalid_request
                message: >-
                  Invalid `entryId`: Expected a valid ID beginning with
                  "accounting_entry_".
                details:
                  /entryId: Expected a valid ID beginning with "accounting_entry_".
                referenceId: 4001-2alj5if
    PublicApiV2Error401Unauthorized:
      description: '- `unauthorized` — API key authentication is missing or invalid.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiV2ErrorUnauthorized'
          examples:
            unauthorized:
              summary: unauthorized
              value:
                code: unauthorized
                message: API key authentication is missing or invalid.
                details: {}
                referenceId: 4011-2alj5if
    PublicApiV2Error403ForbiddenForbiddenLegalEntityNotAvailableUserApiKeyRequired:
      description: >-
        - `forbidden` — The credential is not permitted to perform this action
        on the resource. When the resource is a field of the request, `details`
        names that `field` and the `id` it received.

        - `forbidden (legal entity)` — The credential is not permitted to act
        for the selected legal entity.

        - `not_available` — Public API v2 is not yet available. Use [Public API
        v1](https://docs.slash.com/introduction) in the meantime.

        - `user_api_key_required` — The API key is scoped to a legal entity
        rather than a user. Every v2 request needs a user API key, created under
        Settings → API keys in the Slash dashboard, together with the
        `x-legal-entity` header.
      content:
        application/json:
          schema:
            anyOf:
              - title: forbidden
                allOf:
                  - $ref: '#/components/schemas/PublicApiV2ErrorForbidden'
              - title: forbidden (legal entity)
                allOf:
                  - $ref: '#/components/schemas/PublicApiV2ErrorForbiddenLegalEntity'
              - title: not_available
                allOf:
                  - $ref: '#/components/schemas/PublicApiV2ErrorNotAvailable'
              - title: user_api_key_required
                allOf:
                  - $ref: '#/components/schemas/PublicApiV2ErrorUserApiKeyRequired'
          examples:
            forbidden:
              summary: forbidden
              value:
                code: forbidden
                message: This credential is not permitted to do that.
                details: {}
                referenceId: 4031-2alj5if
            forbidden_legal_entity:
              summary: forbidden (legal entity)
              value:
                code: forbidden
                message: This credential is not permitted to do that.
                details: {}
                referenceId: 4031-2alj5if
            not_available:
              summary: not_available
              value:
                code: not_available
                message: >-
                  Public API v2 is not yet available. Use Public API v1
                  (https://docs.slash.com/introduction) in the meantime.
                details: {}
                referenceId: 4031-2alj5if
            user_api_key_required:
              summary: user_api_key_required
              value:
                code: user_api_key_required
                message: >-
                  Public API v2 requires a user API key. Create one under
                  Settings → API keys in the Slash dashboard.
                details: {}
                referenceId: 4031-2alj5if
    PublicApiV2Error404AccountingEntriesArchive:
      description: >-
        - `not_found` — No resource matches the identifier. When the identifier
        is a field of the request, `details` names that `field` and the `id` it
        received.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiV2ErrorNotFound'
          examples:
            not_found_entry_id:
              summary: not_found (entryId)
              value:
                code: not_found
                message: '`entryId` accounting_entry_2rj4l7hmrrrcv was not found.'
                details:
                  field: entryId
                  id: accounting_entry_2rj4l7hmrrrcv
                referenceId: 4041-2alj5if
    PublicApiV2Error409BillPaymentEntryReadOnlyEntrySyncInProgress:
      description: >-
        - `bill_payment_entry_read_only` — Bill payment entries take their
        coding from the bill they pay. Code the bill’s entry instead.

        - `entry_sync_in_progress` — The entry is `pending_sync` or `syncing`.
        Retry once a read of the entry shows `synced` or `failed`.
      content:
        application/json:
          schema:
            anyOf:
              - title: bill_payment_entry_read_only
                allOf:
                  - $ref: >-
                      #/components/schemas/PublicApiV2ErrorBillPaymentEntryReadOnly
              - title: entry_sync_in_progress
                allOf:
                  - $ref: '#/components/schemas/PublicApiV2ErrorEntrySyncInProgress'
          examples:
            bill_payment_entry_read_only:
              summary: bill_payment_entry_read_only
              value:
                code: bill_payment_entry_read_only
                message: >-
                  Bill payment entries are coded automatically from their bill
                  and cannot be edited.
                details: {}
                referenceId: 4091-2alj5if
            entry_sync_in_progress:
              summary: entry_sync_in_progress
              value:
                code: entry_sync_in_progress
                message: >-
                  The entry is syncing and cannot be changed until the sync
                  finishes.
                details:
                  status: syncing
                referenceId: 4091-2alj5if
    PublicApiV2RateLimited:
      description: >-
        The request exceeded the applicable rate limit. The response body is
        plain text, not the error object; clients must not depend on its
        wording.
      content:
        text/plain:
          schema:
            type: string
          example: You are rate limited
    PublicApiV2Error500Internal:
      description: >-
        - `internal` — Slash could not complete the request. Quote `referenceId`
        when contacting Slash support.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiV2ErrorInternal'
          examples:
            internal:
              summary: internal
              value:
                code: internal
                message: >-
                  An unexpected error occurred. If this keeps happening, contact
                  Slash support with the reference id below.
                details: {}
                referenceId: 5001-2alj5if
  securitySchemes:
    api_key:
      type: apiKey
      name: X-API-Key
      in: header
      description: >-
        User API key authentication. Create a key under Settings → API keys in
        the Slash dashboard (https://app.slash.com/global-settings/api-keys) and
        send the `x-legal-entity` header naming the legal entity to act on with
        every request. Keys scoped to a legal entity are rejected with `403
        user_api_key_required`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.