openapi: 3.0.1
info:
  title: Slicker Public API
  version: 1.0.0
  description: API for reconciling Slicker actions.
servers:
- url: https://api.slickerhq.com/v1
security:
  - bearerAuth: []
tags:
- name: PublicAPIService
paths:
  /recovery_actions:
    get:
      summary: List recovery actions
      description: List recovery actions created by Slicker for the given parameters, including scheduled actions when explicitly requested.
      security:
        - bearerAuth: []
      tags:
      - PublicAPIService
      operationId: PublicAPIService_ListRecoveryActions
      parameters:
      - name: pageSize
        in: query
        description: Number of recovery actions to return per page. Maximum value is 100. Defaults to 100 if not specified or if value is less than 1.
        schema:
          type: integer
          format: int32
          maximum: 100
      - name: pageToken
        in: query
        description: Token for retrieving the next page of results. Use the `nextPageToken` from a previous response and repeat the same filters, ordering, direction, and page size. Pagination does not pin a database snapshot, so actions created or updated between requests may shift later pages.
        schema:
          type: string
      - name: subscriptionId
        in: query
        description: Filter recovery actions by the subscription ID in your billing system. E.g. the Chargebee subscription ID.
        schema:
          type: string
      - name: invoiceId
        in: query
        description: Filter recovery actions by the invoice ID in your billing system. E.g. the Chargebee invoice ID.
        schema:
          type: string
      - name: customerId
        in: query
        description: Filter recovery actions by the customer ID in your billing system. E.g. the Chargebee customer ID.
        schema:
          type: string
      - name: cardCountry
        in: query
        description: Filter recovery actions by card country. Must be a valid ISO 3166 alpha-2 country code (e.g., US, IN, GB).
        schema:
          type: string
          pattern: '^[A-Z]{2}$'
      - name: currency
        in: query
        description: Filter recovery actions by currency. Must be a valid ISO 4217 currency code (e.g., USD, EUR, GBP).
        schema:
          type: string
      - name: status
        in: query
        description: Filter recovery actions by status. If omitted, pending, succeeded, and failed actions are returned. Scheduled actions must be requested explicitly and represent a provisional snapshot that may change.
        schema:
          type: string
          enum:
            - RECOVERY_ACTION_STATUS_PENDING
            - RECOVERY_ACTION_STATUS_SUCCEEDED
            - RECOVERY_ACTION_STATUS_FAILED
            - RECOVERY_ACTION_STATUS_SCHEDULED
      - name: executedAfter
        in: query
        description: Filter recovery actions at or after this date and time (inclusive). For `RECOVERY_ACTION_STATUS_SCHEDULED`, this applies to `scheduledAt`; for all other statuses, it applies to `executedAt`. Use ISO 8601 format with UTC timezone. Example - `2024-01-15T10:30:00Z`
        schema:
          type: string
      - name: executedBefore
        in: query
        description: Filter recovery actions at or before this date and time (inclusive). For `RECOVERY_ACTION_STATUS_SCHEDULED`, this applies to `scheduledAt`; for all other statuses, it applies to `executedAt`. Use ISO 8601 format with UTC timezone. Example - `2024-01-31T23:59:59Z`
        schema:
          type: string
      - name: orderBy
        in: query
        description: Field to sort results by. Valid options are "executed_at", "scheduled_at", "created_at", or "updated_at". Scheduled queries default to "scheduled_at"; all other queries default to "executed_at".
        schema:
          type: string
          enum:
            - executed_at
            - scheduled_at
            - created_at
            - updated_at
      - name: orderDirection
        in: query
        description: Sort order direction. Must be either "asc" for ascending or "desc" for descending. Scheduled queries default to "asc"; all other queries default to "desc".
        schema:
          type: string
          enum:
            - asc
            - desc
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicv1ListRecoveryActionsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: |
        API key authentication using a Bearer token in the Authorization header.
        You can find and manage your API keys at [https://auth.slickerhq.com/org/api_keys](https://auth.slickerhq.com/org/api_keys).
        Example: `Authorization: Bearer YOUR_API_KEY`
  schemas:
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties:
        type: object
    publicv1IntegrationType:
      type: string
      default: INTEGRATION_TYPE_STRIPE
      example: INTEGRATION_TYPE_STRIPE
      enum:
      - INTEGRATION_TYPE_UNSPECIFIED
      - INTEGRATION_TYPE_CUSTOM
      - INTEGRATION_TYPE_STRIPE
      - INTEGRATION_TYPE_ADYEN
      - INTEGRATION_TYPE_PAYPAL
      - INTEGRATION_TYPE_BRAINTREE
      - INTEGRATION_TYPE_CYBERSOURCE
      - INTEGRATION_TYPE_CHECKOUT
      - INTEGRATION_TYPE_RECURLY
      - INTEGRATION_TYPE_CHARGEBEE
      - INTEGRATION_TYPE_ZUORA
      - INTEGRATION_TYPE_RECHARGE
      - INTEGRATION_TYPE_WORLDPAY
      - INTEGRATION_TYPE_AUTHORIZENET
    publicv1ListRecoveryActionsResponse:
      type: object
      properties:
        recoveryActions:
          type: array
          items:
            $ref: '#/components/schemas/publicv1RecoveryAction'
        nextPageToken:
          type: string
          example: "50"
        totalSize:
          type: integer
          format: int32
          example: 150
    publicv1RecoveryAction:
      type: object
      properties:
        id:
          type: string
          example: "ract_1NvzFX2eZvKYlo2CaVKfbuKN"
        subscriptionId:
          type: string
          example: "sub_1NvzFX2eZvKYlo2CaVKfbuKN"
        invoiceId:
          type: string
          example: "in_1NvzFX2eZvKYlo2CaVKfbuKN"
        customerId:
          type: string
          example: "cus_1NvzFX2eZvKYlo2CaVKfbuKN"
        transactionId:
          type: string
          example: "txn_1NvzFX2eZvKYlo2CaVKfbuKN"
        paymentMethodType:
          type: string
          example: "card"
        cardCountry:
          type: string
          example: "US"
        currency:
          type: string
          example: "USD"
        type:
          $ref: '#/components/schemas/v1RecoveryActionType'
        status:
          $ref: '#/components/schemas/publicv1RecoveryActionStatus'
        integrationType:
          $ref: '#/components/schemas/publicv1IntegrationType'
        createdAt:
          type: string
          format: date-time
          example: "2024-01-15T10:30:00Z"
        executedAt:
          type: string
          format: date-time
          example: "2024-01-15T10:35:00Z"
        scheduledAt:
          type: string
          format: date-time
          description: The retry's scheduled time. For scheduled actions, this is a provisional value that may change.
          example: "2024-01-18T14:30:00Z"
        updatedAt:
          type: string
          format: date-time
          example: "2024-01-15T10:35:00Z"
    publicv1RecoveryActionStatus:
      type: string
      default: RECOVERY_ACTION_STATUS_SUCCEEDED
      example: RECOVERY_ACTION_STATUS_SUCCEEDED
      enum:
      - RECOVERY_ACTION_STATUS_UNSPECIFIED
      - RECOVERY_ACTION_STATUS_PENDING
      - RECOVERY_ACTION_STATUS_SUCCEEDED
      - RECOVERY_ACTION_STATUS_FAILED
      - RECOVERY_ACTION_STATUS_SCHEDULED
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    v1RecoveryActionType:
      type: string
      default: RECOVERY_ACTION_TYPE_RETRY
      example: RECOVERY_ACTION_TYPE_RETRY
      enum:
      - RECOVERY_ACTION_TYPE_UNSPECIFIED
      - RECOVERY_ACTION_TYPE_RETRY
x-original-swagger-version: "2.0"
