> ## 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.

# Update an invoice series

> Edit an `active` series.

Its scheduled invoice is rewritten to match, and invoices already sent are left as they are. See [Edit a series](/docs/v2/invoices/recurring-invoices#edit-a-series).


## OpenAPI

````yaml /openapi-v2.json patch /v2/invoices/series/{seriesId}
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/invoices/series/{seriesId}:
    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: seriesId
        in: path
        required: true
        description: Series id with the `inv_series_` prefix.
        schema:
          type: string
    patch:
      summary: Update an invoice series
      description: >-
        Edit an `active` series. Its scheduled invoice is rewritten to match,
        and invoices already sent are left as they are. See [Edit a
        series](/docs/v2/invoices/recurring-invoices#edit-a-series).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/invoice-series-update'
            example:
              paymentTermsDays: 15
      responses:
        '200':
          description: The updated series.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invoice-series'
        '400':
          $ref: '#/components/responses/PublicApiV2Error400InvoicesSeriesUpdate'
        '401':
          $ref: '#/components/responses/PublicApiV2Error401Unauthorized'
        '403':
          $ref: >-
            #/components/responses/PublicApiV2Error403FeatureNotEnabledForbiddenForbiddenLegalEntityNotAvailableUserApiKeyRequired
        '404':
          $ref: '#/components/responses/PublicApiV2Error404InvoicesSeriesUpdate'
        '409':
          $ref: '#/components/responses/PublicApiV2Error409InvoiceSeriesNotActive'
        '429':
          $ref: '#/components/responses/PublicApiV2RateLimited'
        '500':
          $ref: '#/components/responses/PublicApiV2Error500Internal'
      security:
        - api_key: []
components:
  schemas:
    invoice-series-update:
      title: InvoiceSeriesUpdate
      description: >-
        Partial update. An omitted field is left unchanged; `null` clears a
        clearable field. `recurrence`, `end`, `lineItems`, `ccEmails` and
        `paymentMethods` are replaced as a whole. Changes apply to the next
        invoice and every one after it.
      type: object
      properties:
        accountId:
          type: string
          description: The account payments settle into, with the `sa_group_` prefix.
        virtualAccountId:
          type: string
          nullable: true
          description: >-
            A virtual account to settle into, with the `subaccount_` prefix.
            `null` settles into the account's primary virtual account.
        recurrence:
          $ref: '#/components/schemas/invoice-series-recurrence'
        startDate:
          type: string
          format: date
        timezone:
          type: string
          minLength: 1
        paymentTermsDays:
          type: integer
          minimum: 0
          maximum: 365
        end:
          $ref: '#/components/schemas/invoice-series-end'
        lineItems:
          type: array
          minItems: 1
          maxItems: 200
          items:
            $ref: '#/components/schemas/invoice-line-item-create'
        discount:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/invoice-discount-create'
          description: '`null` removes the discount.'
        taxRate:
          type: number
          nullable: true
          minimum: 0
          maximum: 100
          description: '`null` removes the tax.'
        memo:
          type: string
          nullable: true
          minLength: 1
          maxLength: 500
          description: '`null` clears the memo.'
        ccEmails:
          type: array
          maxItems: 10
          uniqueItems: true
          items:
            type: string
            format: email
        paymentMethods:
          type: array
          maxItems: 4
          items:
            $ref: '#/components/schemas/invoice-payment-method-input'
      additionalProperties: false
    invoice-series:
      title: InvoiceSeries
      description: >-
        Issues the same invoice to a customer on a schedule. Each invoice is
        created `scheduled` ahead of its send date, is sent at 9:00 in the
        series' `timezone`, and then behaves like any other invoice. All amounts
        are in USD.
      type: object
      properties:
        id:
          type: string
          description: Series id with the `inv_series_` prefix.
          example: inv_series_2rj4l7hmrrrcv
        status:
          type: string
          enum:
            - active
            - ended
            - cancelled
          description: >-
            See [How a series
            works](/docs/v2/invoices/recurring-invoices#how-a-series-works).
        customerId:
          type: string
          description: Customer id with the `le_cus_` prefix.
        accountId:
          type: string
          description: The account payments settle into, with the `sa_group_` prefix.
        virtualAccountId:
          type: string
          description: >-
            The virtual account payments settle into, with the `subaccount_`
            prefix. Absent when they settle into the account's primary virtual
            account.
        recurrence:
          $ref: '#/components/schemas/invoice-series-recurrence'
        startDate:
          type: string
          format: date
          description: The first day the series can issue an invoice on.
        timezone:
          type: string
          description: The IANA timezone the series' dates are in.
          example: America/New_York
        paymentTermsDays:
          type: integer
          description: Each invoice is due this many days after it's issued.
        end:
          $ref: '#/components/schemas/invoice-series-end'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/invoice-line-item'
        discount:
          $ref: '#/components/schemas/invoice-discount'
        taxRate:
          type: number
          description: Tax as a percent of the subtotal after the discount.
        amounts:
          type: object
          description: Each invoice's amounts.
          properties:
            subtotal:
              $ref: '#/components/schemas/Money'
            discount:
              $ref: '#/components/schemas/Money'
            tax:
              $ref: '#/components/schemas/Money'
            total:
              $ref: '#/components/schemas/Money'
          required:
            - subtotal
            - discount
            - tax
            - total
        memo:
          type: string
        ccEmails:
          type: array
          items:
            type: string
        paymentMethods:
          type: array
          items:
            $ref: '#/components/schemas/invoice-payment-method'
        nextInvoiceDate:
          type: string
          format: date
          description: When the next invoice goes out. Only on `active` series.
        nextInvoiceId:
          type: string
          description: >-
            The next invoice, already created as `scheduled`, with the `inv_`
            prefix. Only on `active` series.
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - status
        - accountId
        - recurrence
        - startDate
        - timezone
        - paymentTermsDays
        - end
        - lineItems
        - amounts
        - ccEmails
        - paymentMethods
        - createdAt
    invoice-series-recurrence:
      title: InvoiceSeriesRecurrence
      description: Which days the series issues an invoice on.
      oneOf:
        - title: Weekly
          type: object
          properties:
            type:
              type: string
              enum:
                - weekly
            dayOfWeek:
              type: integer
              minimum: 0
              maximum: 6
              description: '`0` is Sunday.'
          required:
            - type
            - dayOfWeek
          additionalProperties: false
        - title: Monthly on a date
          type: object
          properties:
            type:
              type: string
              enum:
                - monthly_day_of_month
            dayOfMonth:
              type: integer
              minimum: 1
              maximum: 31
              description: In shorter months, the last day of the month.
          required:
            - type
            - dayOfMonth
          additionalProperties: false
        - title: Monthly on a weekday
          type: object
          properties:
            type:
              type: string
              enum:
                - monthly_nth_weekday
            nth:
              oneOf:
                - type: integer
                  minimum: 1
                  maximum: 4
                - type: string
                  enum:
                    - last
              description: Which occurrence of `dayOfWeek` in the month.
            dayOfWeek:
              type: integer
              minimum: 0
              maximum: 6
              description: '`0` is Sunday.'
          required:
            - type
            - nth
            - dayOfWeek
          additionalProperties: false
    invoice-series-end:
      title: InvoiceSeriesEnd
      description: When the series stops issuing invoices.
      oneOf:
        - title: Never
          type: object
          properties:
            type:
              type: string
              enum:
                - never
          required:
            - type
          additionalProperties: false
        - title: After a number of invoices
          type: object
          properties:
            type:
              type: string
              enum:
                - after_count
            count:
              type: integer
              minimum: 1
              description: How many invoices the series issues in all.
          required:
            - type
            - count
          additionalProperties: false
        - title: On a date
          type: object
          properties:
            type:
              type: string
              enum:
                - on_date
            date:
              type: string
              format: date
              description: No invoices are issued after this day.
          required:
            - type
            - date
          additionalProperties: false
    invoice-line-item-create:
      title: InvoiceLineItemCreate
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          example: Robot arm maintenance
        quantity:
          type: number
          exclusiveMinimum: 0
          description: >-
            Number of units greater than zero. Fractional quantities are
            allowed.
          example: 2
        unitAmount:
          type: object
          description: Price per unit in USD cents.
          properties:
            amount:
              type: integer
              minimum: 0
              example: 45000
            currency:
              type: string
              enum:
                - USD
          required:
            - amount
            - currency
          additionalProperties: false
        catalogItemId:
          type: string
          description: >-
            The catalog item this line comes from, with the `cat_item_` prefix.
            Send the item's `name` and `unitAmount` too; the line keeps what you
            send.
      required:
        - name
        - quantity
        - unitAmount
      additionalProperties: false
    invoice-discount-create:
      title: InvoiceDiscountCreate
      description: Taken off the line items' subtotal before tax.
      oneOf:
        - title: Percentage
          type: object
          properties:
            type:
              type: string
              enum:
                - percentage
            percent:
              type: number
              exclusiveMinimum: 0
              maximum: 100
              description: Percent of the subtotal. `10` means 10%.
              example: 10
          required:
            - type
            - percent
          additionalProperties: false
        - title: Fixed
          type: object
          properties:
            type:
              type: string
              enum:
                - fixed
            amount:
              $ref: '#/components/schemas/UsdMoney'
          required:
            - type
            - amount
          additionalProperties: false
    invoice-payment-method-input:
      title: InvoicePaymentMethodInput
      type: object
      properties:
        type:
          type: string
          enum:
            - bank_transfer
            - ach_debit
            - card
            - crypto
        passFeeToPayer:
          type: boolean
          description: >-
            Whether the payer covers the processing fee. Defaults to `false`;
            ignored for `bank_transfer`.
      required:
        - type
      additionalProperties: false
    invoice-line-item:
      title: InvoiceLineItem
      type: object
      properties:
        name:
          type: string
          example: Robot arm maintenance
        quantity:
          type: number
          example: 2
        unitAmount:
          $ref: '#/components/schemas/Money'
        total:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: '`quantity` times `unitAmount`.'
        catalogItemId:
          type: string
          description: >-
            The catalog item the line was added from, with the `cat_item_`
            prefix. The line keeps the name and price it was written with.
      required:
        - name
        - quantity
        - unitAmount
        - total
    invoice-discount:
      title: InvoiceDiscount
      description: Taken off the line items' subtotal before tax.
      oneOf:
        - title: Percentage
          type: object
          properties:
            type:
              type: string
              enum:
                - percentage
            percent:
              type: number
              description: Percent of the subtotal. `10` means 10%.
              example: 10
          required:
            - type
            - percent
        - title: Fixed
          type: object
          properties:
            type:
              type: string
              enum:
                - fixed
            amount:
              $ref: '#/components/schemas/Money'
          required:
            - type
            - amount
    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
    invoice-payment-method:
      title: InvoicePaymentMethod
      description: A way the payer can pay on the invoice's payment page.
      type: object
      properties:
        type:
          type: string
          enum:
            - bank_transfer
            - ach_debit
            - card
            - crypto
          description: >-
            `bank_transfer` (ACH, wire or realtime payment to the account's
            details) is always offered.
        passFeeToPayer:
          type: boolean
          description: Whether the payer covers the method's processing fee.
      required:
        - type
        - passFeeToPayer
    PublicApiV2ErrorInvoiceAmountBelowCryptoMinimum:
      title: PublicApiV2ErrorInvoiceAmountBelowCryptoMinimum
      description: >-
        Crypto payments have a minimum amount. Offer another payment method or
        raise the total.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - invoice_amount_below_crypto_minimum
            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
    PublicApiV2ErrorInvoiceAmountExceedsAchDebitLimit:
      title: PublicApiV2ErrorInvoiceAmountExceedsAchDebitLimit
      description: >-
        A single ACH debit cannot cover the invoice total. Offer another payment
        method or lower the total.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - invoice_amount_exceeds_ach_debit_limit
            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
    PublicApiV2ErrorInvoiceSeriesEndBeforeStart:
      title: PublicApiV2ErrorInvoiceSeriesEndBeforeStart
      description: With the change applied, the series would end before it starts.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - invoice_series_end_before_start
            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
    PublicApiV2ErrorInvoiceTotalNotPositive:
      title: PublicApiV2ErrorInvoiceTotalNotPositive
      description: >-
        After the discount and tax are applied, the line items must add up to
        more than zero.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - invoice_total_not_positive
            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
    PublicApiV2ErrorPaymentMethodNotAvailable:
      title: PublicApiV2ErrorPaymentMethodNotAvailable
      description: >-
        The payment method is not available for the legal entity or for the
        account receiving the invoice. Global USD accounts do not accept ACH
        debit.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - payment_method_not_available
            details:
              type: object
              properties:
                type:
                  type: string
                  description: The payment method type that was refused.
                  example: ach_debit
                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.
              required:
                - type
              additionalProperties: false
          required:
            - code
            - details
    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
    PublicApiV2ErrorFeatureNotEnabled:
      title: PublicApiV2ErrorFeatureNotEnabled
      description: >-
        The feature this request uses is not enabled for the legal entity.
        Contact Slash support to enable it.
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - feature_not_enabled
            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
    PublicApiV2ErrorInvoiceSeriesNotActive:
      title: PublicApiV2ErrorInvoiceSeriesNotActive
      description: >-
        Ended and cancelled series issue no more invoices. Create a new series
        to keep billing the customer. See [How a series
        works](/docs/v2/invoices/recurring-invoices#how-a-series-works).
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            code:
              type: string
              enum:
                - invoice_series_not_active
            details:
              type: object
              properties:
                status:
                  type: string
                  description: The series’ current `status`.
                  example: cancelled
              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
    UsdMoney:
      type: object
      description: A positive USD amount expressed in cents.
      properties:
        amount:
          type: integer
          minimum: 1
          description: Amount in cents. For example, `1250` represents USD 12.50.
          example: 1250
        currency:
          type: string
          enum:
            - USD
      required:
        - amount
        - currency
      additionalProperties: false
      title: UsdMoney
    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:
    PublicApiV2Error400InvoicesSeriesUpdate:
      description: >-
        - `invoice_amount_below_crypto_minimum` — Crypto payments have a minimum
        amount. Offer another payment method or raise the total.

        - `invoice_amount_exceeds_ach_debit_limit` — A single ACH debit cannot
        cover the invoice total. Offer another payment method or lower the
        total.

        - `invoice_series_end_before_start` — With the change applied, the
        series would end before it starts.

        - `invoice_total_not_positive` — After the discount and tax are applied,
        the line items must add up to more than zero.

        - `payment_method_not_available` — The payment method is not available
        for the legal entity or for the account receiving the invoice. Global
        USD accounts do not accept ACH debit.

        - `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:
            anyOf:
              - title: invoice_amount_below_crypto_minimum
                allOf:
                  - $ref: >-
                      #/components/schemas/PublicApiV2ErrorInvoiceAmountBelowCryptoMinimum
              - title: invoice_amount_exceeds_ach_debit_limit
                allOf:
                  - $ref: >-
                      #/components/schemas/PublicApiV2ErrorInvoiceAmountExceedsAchDebitLimit
              - title: invoice_series_end_before_start
                allOf:
                  - $ref: >-
                      #/components/schemas/PublicApiV2ErrorInvoiceSeriesEndBeforeStart
              - title: invoice_total_not_positive
                allOf:
                  - $ref: >-
                      #/components/schemas/PublicApiV2ErrorInvoiceTotalNotPositive
              - title: payment_method_not_available
                allOf:
                  - $ref: >-
                      #/components/schemas/PublicApiV2ErrorPaymentMethodNotAvailable
              - title: invalid_request (request shape)
                allOf:
                  - $ref: '#/components/schemas/PublicApiV2ErrorInvalidRequestShape'
          examples:
            invoice_amount_below_crypto_minimum:
              summary: invoice_amount_below_crypto_minimum
              value:
                code: invoice_amount_below_crypto_minimum
                message: >-
                  The invoice total is under the crypto payment minimum; remove
                  crypto or raise the total.
                details: {}
                referenceId: 4001-2alj5if
            invoice_amount_exceeds_ach_debit_limit:
              summary: invoice_amount_exceeds_ach_debit_limit
              value:
                code: invoice_amount_exceeds_ach_debit_limit
                message: >-
                  The invoice total is over the single ACH debit limit; remove
                  ach_debit or lower the total.
                details: {}
                referenceId: 4001-2alj5if
            invoice_series_end_before_start_end:
              summary: invoice_series_end_before_start (end)
              value:
                code: invoice_series_end_before_start
                message: end.date must be after startDate.
                details:
                  field: end
                referenceId: 4001-2alj5if
            invoice_series_end_before_start_start_date:
              summary: invoice_series_end_before_start (startDate)
              value:
                code: invoice_series_end_before_start
                message: end.date must be after startDate.
                details:
                  field: startDate
                referenceId: 4001-2alj5if
            invoice_total_not_positive_line_items:
              summary: invoice_total_not_positive (lineItems)
              value:
                code: invoice_total_not_positive
                message: The invoice total must be more than zero.
                details:
                  field: lineItems
                referenceId: 4001-2alj5if
            invoice_total_not_positive_discount:
              summary: invoice_total_not_positive (discount)
              value:
                code: invoice_total_not_positive
                message: The invoice total must be more than zero.
                details:
                  field: discount
                referenceId: 4001-2alj5if
            payment_method_not_available_payment_methods:
              summary: payment_method_not_available (paymentMethods)
              value:
                code: payment_method_not_available
                message: Payers cannot pay this invoice by ach_debit.
                details:
                  type: ach_debit
                  field: paymentMethods
                referenceId: 4001-2alj5if
            payment_method_not_available_account_id:
              summary: payment_method_not_available (accountId)
              value:
                code: payment_method_not_available
                message: Payers cannot pay this invoice by ach_debit.
                details:
                  type: ach_debit
                  field: accountId
                  id: sa_group_2rj4l7hmrrrcv
                referenceId: 4001-2alj5if
            payment_method_not_available_virtual_account_id:
              summary: payment_method_not_available (virtualAccountId)
              value:
                code: payment_method_not_available
                message: Payers cannot pay this invoice by ach_debit.
                details:
                  type: ach_debit
                  field: virtualAccountId
                  id: subaccount_2rj4l7hmrrrcv
                referenceId: 4001-2alj5if
            invalid_request_request_shape:
              summary: invalid_request (request shape)
              value:
                code: invalid_request
                message: >-
                  Invalid `seriesId`: Expected a valid ID beginning with
                  "inv_series_".
                details:
                  /seriesId: Expected a valid ID beginning with "inv_series_".
                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
    PublicApiV2Error403FeatureNotEnabledForbiddenForbiddenLegalEntityNotAvailableUserApiKeyRequired:
      description: >-
        - `feature_not_enabled` — The feature this request uses is not enabled
        for the legal entity. Contact Slash support to enable it.

        - `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: feature_not_enabled
                allOf:
                  - $ref: '#/components/schemas/PublicApiV2ErrorFeatureNotEnabled'
              - 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:
            feature_not_enabled:
              summary: feature_not_enabled
              value:
                code: feature_not_enabled
                message: >-
                  This feature is not enabled for you. Please contact support to
                  get it.
                details: {}
                referenceId: 4031-2alj5if
            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
    PublicApiV2Error404InvoicesSeriesUpdate:
      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_series_id:
              summary: not_found (seriesId)
              value:
                code: not_found
                message: '`seriesId` inv_series_2rj4l7hmrrrcv was not found.'
                details:
                  field: seriesId
                  id: inv_series_2rj4l7hmrrrcv
                referenceId: 4041-2alj5if
            not_found_account_id:
              summary: not_found (accountId)
              value:
                code: not_found
                message: '`accountId` sa_group_2rj4l7hmrrrcv was not found.'
                details:
                  field: accountId
                  id: sa_group_2rj4l7hmrrrcv
                referenceId: 4041-2alj5if
            not_found_virtual_account_id:
              summary: not_found (virtualAccountId)
              value:
                code: not_found
                message: '`virtualAccountId` subaccount_2rj4l7hmrrrcv was not found.'
                details:
                  field: virtualAccountId
                  id: subaccount_2rj4l7hmrrrcv
                referenceId: 4041-2alj5if
            not_found_line_items:
              summary: not_found (lineItems)
              value:
                code: not_found
                message: '`lineItems` was not found.'
                details:
                  field: lineItems
                referenceId: 4041-2alj5if
    PublicApiV2Error409InvoiceSeriesNotActive:
      description: >-
        - `invoice_series_not_active` — Ended and cancelled series issue no more
        invoices. Create a new series to keep billing the customer. See [How a
        series works](/docs/v2/invoices/recurring-invoices#how-a-series-works).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiV2ErrorInvoiceSeriesNotActive'
          examples:
            invoice_series_not_active:
              summary: invoice_series_not_active
              value:
                code: invoice_series_not_active
                message: The series is cancelled; only active series can be changed.
                details:
                  status: cancelled
                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.