openapi: 3.1.0
x-stoplight:
  id: lrl5m5o4kz4jp
info:
  version: "1.0"
  title: NFT API
  summary: API to enable direct NFT purchasing
  description: Reference for Sardine Crypto API
servers:
  - url: "https://api.sandbox.sardine.ai/v1"
    description: Sandbox
  - url: "https://api.sardine.ai/v1"
    description: Prod Server
paths:
  /auth/client-tokens:
    post:
      summary: Post Client Token
      description: |-
        Exchange your `clientId` and `clientSecret` for a `clientToken` that can be be used in frontend code. `clientToken` will be unusable after the `expiresAt` time, which will normally be after 30 min. 


        To try the request in the mock server on the right, substitute username for clientId and password for clientSecre
      operationId: post-crypto-auth-client_session_token
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: object
              properties:
                referenceId:
                  type: string
                  description: Unique ID for an order
                  format: uuid
                expiresIn:
                  type: number
                  description:
                    "Time, in seconds, after which this Order will expire"
                  maximum: 3600
                  examples:
                    - 60
                externalUserId:
                  type: string
                  description:
                    A unique ID that represents a user or customer. This can be
                    used if you wish to track orders on a per customer basis
                  format: uuid
                nft:
                  type: object
                  required:
                    - name
                    - imageUrl
                  properties:
                    name:
                      type: string
                      description: Name of NFT
                    imageUrl:
                      type: string
                      description:
                        URL where image of the NFT can be retrieved from
                      format: uri
                    price:
                      type: number
                      description: Cost of the NFT in `currencyCode`
                      format: float
                      minimum: 0
                    executionType:
                      x-stoplight:
                        id: o949rg293xde1
                      enum:
                        - smart_contract
                    network:
                      type: string
                      x-stoplight:
                        id: 8s1vzwgs8ccji
                      example: polygon
                    recipientAddress:
                      type: string
                      x-stoplight:
                        id: a4ic9fhftejq6
                      example: "0x942D5A8BaC9684a3Fc1150b3cBbf931f32bBa514"
                    platform:
                      x-stoplight:
                        id: r3ksrs2amvgc5
                      enum:
                        - niftyswap
                        - sequence_market
                        - ERC8000
                        - ""
                    contractAddress:
                      type: string
                      x-stoplight:
                        id: pb6ylyj8k3oz8
                      example: "0x8bb759bb68995343ff1e9d57ac85ff5c5fb79334"
                    blockchainNftId:
                      type: string
                      x-stoplight:
                        id: 351snwicrti0o
                    quantity:
                      type: integer
                      description: Quantity of the good being purchased
                    currencyCode:
                      const: usd
                      description: "Fiat currency this NFT is priced in. "
                taxRates:
                  type: object
                  description:
                    Which contains rates for countries/regions in ISO3166-2
                    format.
                  properties:
                    US-NY:
                      type: string
                      description:
                        'countrycode-subdivisions like US-NY. "US-NY": 13 means
                        13% for NY state.'
                      examples:
                        - US-NY = 13
                    US:
                      type: string
                      description:
                        "Countrycode like US. It's percentage, US: 10 means 10%
                        tax for all US"
                      examples:
                        - US = 10
                    US-CA:
                      type: string
                      description:
                        'countrycode-subdivisions like US-CA. "US-CA": 20 means
                        20% for CA state.'
                      examples:
                        - US-CA = 20
                identityPrefill:
                  type: object
                  description:
                    "If fields here are passed, they will be pre filled in the
                    Checkout"
                  properties:
                    firstName:
                      type: string
                      description: First name of customer
                    lastName:
                      type: string
                      description: Last name of customer
                    dateOfBirth:
                      type: string
                      description: Date of birth in YYYY-MM-DD
                      format: date
                    emailAddress:
                      type: string
                      description: Email address of user
                      format: email
                    phone:
                      type: string
                      description: Phone number of user with country code
                    address:
                      type: object
                      properties:
                        street1:
                          type: string
                        street2:
                          type: string
                        city:
                          type: string
                        regionCode:
                          type: string
                        postalCode:
                          type: string
                        countryCode:
                          type: string
            examples:
              example-1:
                value:
                  referenceId: 42eadcb0-4a93-45af-9c8c-d295db5aeb6c
                  customerId: adf02ae2-f633-11ec-b939-0242ac120002
                  nft:
                    name: "NFT #1"
                    price: 100
                    currencyCode: USD
                    imageUrl: "https://gateway.nftcompany.io/ipfsQmSAQm4gbhjSeUk7fuYppHd7Z8dfWpBvnFmqFSKqkrUJPM"
                  identityPrefill:
                    firstName: John
                    lastName: Doe
                    dateOfBirth: "2000-01-01"
                    emailAddress: foobar@gmail.com
                    phone: "+19254485826"
                    address:
                      street1: 123 Main st
                      street2: ""
                      city: irvine
                      regionCode: CA
                      postalCode: "02747"
                      countryCode: US
                  taxRates:
                    US: 10
                    US-CA: 20
              example-2:
                value:
                  nft:
                    name: The BEST NFT FOR DEMO PURPOSE NEW NFT
                    price: 100
                    currencyCode: CAD
                    contractAddress: "0x7fC0344254E1663C2eF24e3c063cbec231525C20"
                    imageUrl: "https://gateway.autograph.io/ipfs/QmSAQm4gbhjSeUk7fuYppHd7Z8dfWpBvnFmqFSKqkrUJPM"
                  taxRates:
                    US: 10
                    US-CA: 20
                    US-NY: 13
              Smart contract execution:
                value:
                  referenceId: test-0.24678085734dwedwedwed04dwedfwrferfwedwed6884
                  expiresIn: 3600
                  identityPrefill:
                    firstName: fname
                    lastName: lname
                    dateOfBirth: "2000-01-01"
                    emailAddress: ethan.itovitch@allow.com
                    phone: "+19923793139"
                    address:
                      street1: 123 main st
                      street2: ""
                      city: irvine
                      regionCode: CA
                      postalCode: "02747"
                      countryCode: US
                  paymentMethodTypeConfig:
                    enabled:
                      - us_debit
                      - us_credit
                      - international_debit
                      - international_credit
                      - ach
                    default: us_debit
                  nft:
                    name: Hot wheels <> Sardine
                    imageUrl: "https://cdn.shopify.com/s/files/1/0568/1132/3597/files/HWNFT_S4_modular-grid_584x800b.jpg?v=1669157307"
                    network: polygon
                    recipientAddress: "0x942D5A8BaC9684a3Fc1150b3cBbf931f32bBa514"
                    platform: niftyswap
                    blockchainNftId: "131111"
                    contractAddress: "0x8bb759bb68995343ff1e9d57ac85ff5c5fb79334"
                    executionType: smart_contract
                    quantity: 1
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  clientToken:
                    type: string
                    description:
                      Unique token that is used to authenticate the merchant
                    format: uuid
                  expiresAt:
                    type: string
                    description: Time at which the order will expire
                    format: date-time
              examples:
                example-1:
                  value:
                    clientToken: 8aeae330-9154-4051-ab98-d173ba2bc7f0
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Set to `false` if exchange is unsuccessful
                  message:
                    type: string
                    description:
                      Contains message describing what error occured during
                      exchange
              examples:
                Error:
                  value:
                    code: UNAUTHORIZED
                    message: Invalid client credentials
      security:
        - ClientToken: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-stoplight:
        id: g1qcpacxbj3g6
  /orders:
    get:
      summary: Get Order(s)
      description: |
        Fetch information about an Order once its completed

        The `status` of an Order can be one of the following

        `Draft` - This is an open or ongoing order

        `Expired`* - The user didn't complete the transaction within the `expiration` time

        `Processed`* - The payment has been completed.

        `Declined`* - The transacation was declined, due to payment method issues

        `Cancelled`* - The transaction did not complete, which could be for a number of reasons, as outlined in the reason codes below. 

        `Complete`* - The payment is complete and the crypto has been delivered to the user's wallet. A `txHash` will be present to denote successful on chain settlement. 

        `Refunded` - The User's payment has been refunded to their original payment method


        ### For Smart Contract Integrations

        Orders might end up in `Cancelled` state, due to a number of reasons, which Sardine will share through a `reasonCode` parameter as part of an `error` object in the Order. After an Order has been Cancelled, it will move to the `Refunded` state

        The following reason codes might appear

        `NETF` - Network Failure
        `PRCC` - Price Change beyond threshold
        `RISD` - Risk Decline
        `NA` - NFT Not Available


        Events marked with an * can also be captured via event handlers on the frontend


        ### Fetching Orders

        Full list of Orders is obtained by making a call to the endpoint with no filters. 


        You have multiple options of filtering orders

        1. Filtering by `orderId`
        If a `redirect_url` was passed to the Sardine checkout (e.g. https://crytpoapp.com"), when then transaction is completed, Sardine will redirect the user to this url with an `order_id` appended i.e. https://cryptoapp.com?order_id=73103-erhed-317313

        This `order_id` can then be used as a filter on this endpoint, this form
        https://api.sandbox.sardine.ai/v1/orders/3103-erhed-317313


        2. Filtering by `referenceId`
        If a `referenceId` was passed in the call to create the `clientToken` for this call, it can now be used to filter for Orders that were created then. 

        3. Filtering by `startDate` and `endDate`
        If `startDate` or `endDate` are passed in YYYY-MM-DD format, the list of Orders will be filtered to those that were created in this range

        4. Filtering by `externalUserId`
      operationId: get-orders
      parameters:
        - name: reference
          in: query
          description: Unique ID that was passed when creating the order
          schema:
            type: string
        - name: startData
          in: query
          description:
            "Date in YYYY-MM-DD format that can be used to filter by time,
            starting with this date"
          schema:
            type: string
        - name: endDate
          in: query
          description:
            "Date in YYYY-MM-DD format that can be used to filter by time,
            ending with this date"
          schema:
            type: string
        - name: externalUserId
          in: query
          description:
            Unique ID created by developer that is passed when creating the
            client token. Non unique
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                  referenceId:
                    type: string
                  status:
                    type: string
                  expiresAt:
                    type: string
                  userId:
                    type: string
                  total:
                    type: integer
                  subtotal:
                    type: number
                  processingFees:
                    type: object
                    properties:
                      tax:
                        type: number
                      clientProcessingFee:
                        type: number
                      networkFee:
                        type: number
                  payment:
                    type: object
                    properties:
                      currency:
                        type: string
                      paymentMethodType:
                        type: string
                  data:
                    type: object
                    properties:
                      transactionType:
                        type: string
                      name:
                        type: string
                      price:
                        type: string
                      contractAddress:
                        type: string
                      imageUrl:
                        type: string
                  error:
                    type: object
                    properties:
                      reasonCode:
                        type: string
                        description:
                          "Reason code if Order is in `Declined`, `Cancelled` or
                          `Refunded`"
                x-examples:
                  example-1:
                    id: 4971a540-9700-47db-93c3-48a179c25b53
                    createdAt: "2022-08-09T18:58:55Z"
                    referenceId: fff123121123dff12332
                    status: Expired
                    expiresAt: "2022-08-09T19:58:55Z"
                    userId: 890a7f-akjsdi983-aps389df87
                    total: 500
                    subtotal: 498.6
                    processingFees:
                      tax: 0.1
                      clientProcessingFee: 1.2
                      networkFee: 0.1
                    payment:
                      currency: USD
                      paymentMethodType: credit
                    data:
                      transactionType: nft
                      name: The BEST NFT FOR DEMO PURPOSE
                      price: "498.6"
                      contractAddress: "0x7fC0344254E1663C2eF24e3c063cbec231525C20"
                      imageUrl: "https://www.dictionary.com/e/wp-content/uploads/2018/03/This-is-Fine-300x300.jpg"
                    withdrawal:
                      txHash: "0x36e38af93e08388fb8140ccaf7e4c6fef2234d5b3f9dc6ace39c53859f9da37d"
                      walletAddress: "0x5e14dfdb3438676255f0e4137c627c73bc7551a0"
              examples:
                Get Order by Reference ID:
                  value:
                    id: 4971a540-9700-47db-93c3-48a179c25b53
                    createdAt: "2022-08-09T18:58:55Z"
                    referenceId: fff123121123dff12332
                    status: Expired
                    expiresAt: "2022-08-09T19:58:55Z"
                    userId: 890a7f-akjsdi983-aps389df87
                    total: 500
                    subtotal: 498.6
                    processingFees:
                      tax: 0.1
                      clientProcessingFee: 1.2
                      networkFee: 0.1
                    payment:
                      currency: USD
                      paymentMethodType: credit
                    data:
                      transactionType: nft
                      name: The BEST NFT FOR DEMO PURPOSE
                      price: "498.6"
                      contractAddress: "0x7fC0344254E1663C2eF24e3c063cbec231525C20"
                      imageUrl: "https://www.dictionary.com/e/wp-content/uploads/2018/03/This-is-Fine-300x300.jpg"
      security:
        - {}
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-stoplight:
        id: llnis53qfnob5
  /payment-method/ach:
    get:
      tags:
        - Payment Method
      summary: Get Bank Account
      description: Get information about Bank Account object
      operationId: get-payment_method-ach
      parameters:
        - name: bank_account_id
          in: query
          description: Bank Account ID.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Bank-Account"
      security: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: w3y6oufp0wk8v
    post:
      tags:
        - Payment Method
      summary: Add new Bank Account using aggregator token
      description: |-
        Add new Bank Account to User. 
        Currently, this can be done in one of two ways

        1. Using a processor token from bank aggregator service like Plaid
        2. Sending information about the user's bank account collected through a Plaid like service
      operationId: post-payment_method-bank-bank_account_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                processor_token:
                  type: string
                bank_aggregator:
                  type: string
                  enum:
                    - plaid
                    - yodlee
                    - finicity
                aggregator_data:
                  type: object
                  properties:
                    auth_response:
                      type: string
                    balance_response:
                      type: string
                    identity_response:
                      type: string
                    transaction_response:
                      type: string
                    aggregator_type:
                      type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Bank-Account"
      security: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: 17fvaqtunwe2v
    delete:
      tags:
        - Payment Method
      summary: Delete Bank Account
      description: Delete bank account with the corresponding bank account ID
      operationId: delete-payment_method-ach-bank_account_id
      parameters:
        - name: bank_account_id
          in: query
          description: Bank Account ID.
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type:
                      oneOf:
                        - type: string
                        - type: boolean
      security:
        - {}
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: t8xiej8ufcb9r
  "/identityDocuments/verifications/{id}":
    get:
      tags:
        - Identity
      summary: Fetch KYC
      description: "Retrieve result of document verification "
      operationId: get-identityDocuments
      parameters:
        - name: type
          in: query
          description:
            "Type of request. Set to `custom` if you build your own UI to
            capture photos, `secure.me` if you use au10tix Web UI, `mobilesdk`
            if you use au10tix native mobile SDK"
          schema:
            type: string
        - name: sessionKey
          in: query
          description:
            uuid that identifies the given customer session or transaction
          schema:
            type: string
            format: uuid
        - name: customerId
          in: query
          description: ID for Customer
          schema:
            type: string
            format: uuid
        - name: id
          in: path
          description: ID of KYC
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/KYC"
              examples:
                example-1:
                  value:
                    verificationId: d67fc8a6-d930-4857-882d-00000000000
                    status: complete
                    documentData:
                      type: driver_license
                      number: S1585910
                      dateOfBirth: "1981-02-17"
                      dateOfIssue: "2020-02-16"
                      dateOfExpiry: "2025-02-17"
                      issuingCountry: US
                      firstName: PARIS WHITNEY
                      middleName: ""
                      lastName: HILTON
                      gender: female
                      address: "936 SE Dolphin Dr, Stuart, Florida 34996"
                    verification:
                      riskLevel: high
                      forgeryLevel: low
                      documentMatchLevel: not_applicable
                      imageQualityLevel: high
                      faceMatchLevel: not_applicable
      security:
        - {}
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: bo49guy9bxr67
  /customers:
    post:
      tags:
        - Customers
      summary: Post Customer Information
      description:
        Send User information to Sardine to store theie information and create a
        risk profile
      operationId: post-customers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                flow:
                  type: string
                  description:
                    Merchant defined string that defines the flow the user is in
                  minLength: 1
                  examples:
                    - "login, onboarding,kyc-ssn"
                sessionKey:
                  type: string
                  description: uuid that identifies the given customer session
                  format: uuid
                  minLength: 1
                customer:
                  type: object
                  properties:
                    id:
                      type: string
                      description:
                        User ID hash. Please use the same value as passed to
                        device intelligence SDK
                      format: uuid
                      minLength: 1
                    taxId:
                      type: string
                      description: SSN or equivalent
                      minLength: 1
                      examples:
                        - "778131234"
                    firstName:
                      type: string
                      description: First name of customer
                      minLength: 1
                      examples:
                        - John
                    lastName:
                      type: string
                      description: Last name of customer
                      minLength: 1
                      examples:
                        - Doe
                    dateOfBirth:
                      type: string
                      description: Date of birth in YYYY-MM-DD
                      format: date-time
                      minLength: 1
                      examples:
                        - "1990-08-15"
                    address:
                      type: object
                      properties:
                        street1:
                          type: string
                          description: Street name
                          minLength: 1
                          examples:
                            - 1 Main St
                        city:
                          type: string
                          description: City name
                          minLength: 1
                          examples:
                            - Okhlahoma
                        regionCode:
                          type: string
                          description: 2 digit State or province code
                          minLength: 1
                          examples:
                            - OK
                        postalCode:
                          type: string
                          description: Postal or Zip code
                          minLength: 1
                          examples:
                            - "70438"
                        countryCode:
                          type: string
                          description: 2 digit Country code
                          minLength: 1
                          examples:
                            - US
                      required:
                        - street1
                        - city
                        - regionCode
                        - postalCode
                        - countryCode
                    transaction:
                      type: object
                      properties:
                        id:
                          type: string
                          description: ID to be associated with transaction
                          format: uuid
                          minLength: 1
                        createdAtMillis:
                          type: number
                          description: Time of transaction in UNIX time
                          examples:
                            - 1616822241000
                        amount:
                          type: number
                          description: Transaction amount
                          examples:
                            - 1000
                        itemCategory:
                          type: string
                          description:
                            "Main item category in cart. e.g. crypto asset(ETH,
                            BTC), gift card, alcohol, generic"
                          minLength: 1
                        actionType:
                          type: string
                          enum:
                            - buy
                            - sell
                            - deposit
                            - exchange
                            - withdraw
                            - refund
                            - payment
                            - topup
                            - transfer
                          description:
                            "Indicates the type of transaction. If you need
                            other action types to be supported, please reach out
                            to the Sardine team."
                          minLength: 1
                        currencyCode:
                          type: string
                          description: 3-digit ISO 4217currency code
                          minLength: 1
                          examples:
                            - USD
                        paymentMethod:
                          type: object
                          properties:
                            type:
                              const: crypto
                              minLength: 1
                            bank:
                              type: object
                              properties:
                                accountNumber:
                                  type: string
                                  description: Account number of banka account
                                  minLength: 1
                                  examples:
                                    - "123456789"
                                routingNumber:
                                  type: string
                                  description: Routing number of bank account
                                  minLength: 1
                                  examples:
                                    - "1298751331"
                                accountType:
                                  type: string
                                  enum:
                                    - checking
                                    - savings
                                    - other
                                  description: Type of account
                                  minLength: 1
                                balance:
                                  type: number
                                  description:
                                    Last known bank balance in minor units like
                                    cents
                                  examples:
                                    - 1000
                                balanceCurrencyCode:
                                  type: string
                                  description: 3 digit currency code
                                  minLength: 1
                                  examples:
                                    - USD
                              required:
                                - accountNumber
                                - routingNumber
                                - accountType
                                - balance
                                - balanceCurrencyCode
                          required:
                            - type
                            - bank
                      required:
                        - id
                        - createdAtMillis
                        - amount
                        - itemCategory
                        - actionType
                        - currencyCode
                        - paymentMethod
                    emailAddress:
                      type: string
                      description: Email address of customer
                      format: email
                      minLength: 1
                    isEmailVerified:
                      type: boolean
                      description: Set to true if email has been verified
                    phone:
                      type: string
                      description: Phone number including country
                      minLength: 1
                      examples:
                        - "+17342321234"
                    isPhoneVerified:
                      type: boolean
                      description:
                        Set to true if phone has been verified via a one time
                        code
                    createdAtMills:
                      type: integer
                      description:
                        "This is time the customer was onboarded/created in your
                        system. Please pass it as Unix timestamp in
                        milliseconds. e.g. 1622057169587 for Wed May 22021
                        19:26:09"
                    personalInfo:
                      type: array
                      items:
                        type: object
                        properties:
                          source:
                            type: string
                            enum:
                              - id_verification
                              - bank_verification
                              - phone_verification
                            description:
                              Source of personal information obtained via
                              external third-party (non-Sardine) for
                              verification. Discuss with Sardine before using
                          firstName:
                            type: string
                            description: First name
                          middleName:
                            type: string
                            description: Middle name
                          lastName:
                            type: string
                            description: Last name
                          address:
                            type: object
                            properties:
                              street1:
                                type: string
                                description: Street
                              street2:
                                type: string
                              city:
                                type: string
                              regionCode:
                                type: string
                              postalCode:
                                type: string
                              countryCode:
                                type: string
                              company:
                                type: string
                          dateOfBirth:
                            type: string
                        required:
                          - source
                  required:
                    - id
                    - taxId
                    - firstName
                    - lastName
                    - dateOfBirth
                    - address
                    - transaction
                    - emailAddress
                    - isEmailVerified
                    - phone
                    - isPhoneVerified
              required:
                - flow
                - sessionKey
                - customer
              x-examples:
                example-1:
                  flow: string
                  sessionKey: string
                  personalInfo:
                    - source: plaid
                      firstName: string
                      middleName: string
                      lastName: string
                      address:
                        street1: string
                        street2: string
                        city: string
                        regionCode: string
                        postalCode: string
                        countryCode: string
                        company: string
                      phone: string
                      emailAddress: string
                      isEmailVerified: true
                      isPhoneVerified: true
                      dateOfBirth: string
                      identityObject: string
                  customer:
                    id: string
                    taxId: string
                    firstName: string
                    lastName: string
                    dateOfBirth: string
                    address:
                      street1: string
                      city: string
                      regionCode: string
                      postalCode: string
                      countryCode: string
                    transaction:
                      id: string
                      createdAtMillis: 0
                      amount: 0
                      itemCategory: string
                      actionType: string
                      currencyCode: string
                      paymentMethod:
                        type: string
                        bank:
                          accountNumber: string
                          routingNumber: string
                          accountType: string
                          balance: 0
                          balanceCurrencyCode: string
                    isEmailVerified: true
                    emailAddress: string
                    phone: string
                    isPhoneVerified: true
            examples:
              example-1:
                value:
                  flow: "login, onboarding,kyc-ssn"
                  sessionKey: 555fdc5c-8694-4345-b724-14454f320484
                  customer:
                    id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
                    taxId: "778131234"
                    firstName: John
                    lastName: Doe
                    dateOfBirth: "1990-08-15"
                    address:
                      street1: 1 Main St
                      city: Okhlahoma
                      regionCode: OK
                      postalCode: "70438"
                      countryCode: US
                    transaction:
                      id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
                      createdAtMillis: 1616822241000
                      amount: 1000
                      itemCategory: crypto
                      actionType: buy
                      currencyCode: USD
                      paymentMethod:
                        type: crypto
                        bank:
                          accountNumber: "123456789"
                          routingNumber: "1298751331"
                          accountType: checking
                          balance: 1000
                          balanceCurrencyCode: USD
                    emailAddress: user@example.com
                    isEmailVerified: true
                    phone: "+17342321234"
                    isPhoneVerified: true
                    createdAtMills: 0
                    personalInfo:
                      - source: id_verification
                        firstName: John
                        lastName: Doe
                        address:
                          street1: 1 Main St
                          city: Okhlahoma
                          regionCode: OK
                          postalCode: "70438"
                          countryCode: US
                        dateOfBirth: "1980-07-15"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Customer"
              examples:
                example-1:
                  value:
                    sessionKey: string
                    level: string
                    status: string
                    customer:
                      score: 0
                      level: string
                      signals:
                        - key: string
                          value: string
                    transaction:
                      level: string
                      amlLevel: string
                      indemnification:
                        decision: string
                        instantLimit: 0
                        holdAmount: 0
                        verificationCode: string
                    checkpoints:
                      customer:
                        customerPurchaseLevel:
                          value: string
                          ruleIds:
                            - {}
                        emailLevel:
                          value: string
                          ruleIds:
                            - {}
                        historicalLevel:
                          value: string
                          ruleIds:
                            - {}
                        riskLevel:
                          value: string
                          ruleIds:
                            - {}
      security:
        - {}
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: xnmcv2m3anqrb
    get:
      tags:
        - Customers
      summary: Get Customers
      description:
        Fetches list of all customers. Can be filtered by passing `customerId`
      operationId: get-customers
      parameters:
        - name: customer_id
          in: query
          description: ID of Customer
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Customer"
              examples:
                example-1:
                  value:
                    - sessionKey: 280CBF35-B4B0-4193-A111
                      level: low
                      status: Success
                      customer:
                        score: 26
                        level: low
                        signals:
                          - key: bankLevel
                            value: low
                          - key: emailDomainLevel
                            value: low
                          - key: emailLevel
                            value: low
                            reasonCodes:
                              - HST
                      transaction:
                        level: low
                        amlLevel: low
                        indemnification:
                          decision: approved
                          instantLimit: 1000
                          holdAmount: 0
                          verificationCode: string
                          holdTime: "1628169754124"
      security:
        - ClientToken: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: vz144ci6o7nx6
  /banks/transactions:
    get:
      tags:
        - Banks
      summary: Send bank information
      description: |-
        Simply populate the appropriate field in the plaidData object. Make sure to fill in the correct field corresponding to the correct Plaid API endpoint. For example, if you call the Plaid transactions API, you should set plaidData.transactionsResponse to be the JSON string containing the response. Note that the response fields in plaidData are all optional and you may populate as many or few as you would like, as long as an authResponse is sent at least once per account.

        Important note: You must provide an authResponse at least once per customer bank account so that we can store the mapping from bank account to Plaid account ID.
      operationId: get-banks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                sessionKey:
                  type: string
                customerId:
                  type: string
                plaidData:
                  type: object
                  properties:
                    transactionsResponse:
                      type: object
                      properties:
                        accounts:
                          type: array
                          items:
                            type: object
                            properties:
                              account_id:
                                type: string
                              balances:
                                type: object
                                properties:
                                  available:
                                    type: integer
                                  current:
                                    type: integer
                                  iso_currency_code:
                                    type: string
                                  limit:
                                    type: "null"
                                  unofficial_currency_code:
                                    type: "null"
                              mask:
                                type: string
                              name:
                                type: string
                              official_name:
                                type: string
                              subtype:
                                type: string
                              type:
                                type: string
                        transactions:
                          type: array
                          items:
                            type: object
                            properties:
                              account_id:
                                type: string
                              amount:
                                type: integer
                              iso_currency_code:
                                type: string
                              unofficial_currency_code:
                                type: "null"
                              category:
                                type: array
                                items:
                                  type: object
                              category_id:
                                type: string
                              check_number:
                                type: "null"
                              date:
                                type: string
                              datetime:
                                type: "null"
                              authorized_date:
                                type: string
                              authorized_datetime:
                                type: "null"
                              location:
                                type: object
                                properties:
                                  address:
                                    type: string
                                  city:
                                    type: string
                                  region:
                                    type: string
                                  postal_code:
                                    type: string
                                  country:
                                    type: string
                                  lat:
                                    type: integer
                                  lon:
                                    type: integer
                                  store_number:
                                    type: string
                              name:
                                type: string
                              merchant_name:
                                type: string
                              payment_meta:
                                type: object
                                properties:
                                  by_order_of:
                                    type: "null"
                                  payee:
                                    type: "null"
                                  payer:
                                    type: "null"
                                  payment_method:
                                    type: "null"
                                  payment_processor:
                                    type: "null"
                                  ppd_id:
                                    type: "null"
                                  reason:
                                    type: "null"
                                  reference_number:
                                    type: "null"
                              payment_channel:
                                type: string
                              pending:
                                type: boolean
                              pending_transaction_id:
                                type: "null"
                              account_owner:
                                type: "null"
                              transaction_id:
                                type: string
                              transaction_code:
                                type: "null"
                              transaction_type:
                                type: string
                        item:
                          type: object
                          properties:
                            available_products:
                              type: array
                              items:
                                type: object
                            billed_products:
                              type: array
                              items:
                                type: object
                            consent_expiration_time:
                              type: "null"
                            error:
                              type: "null"
                            institution_id:
                              type: string
                            item_id:
                              type: string
                            update_type:
                              type: string
                            webhook:
                              type: string
                        total_transactions:
                          type: integer
                        request_id:
                          type: string
                    authResponse:
                      type: object
                      properties:
                        accounts:
                          type: array
                          items:
                            type: object
                            properties:
                              account_id:
                                type: string
                              balances:
                                type: object
                                properties:
                                  available:
                                    type: integer
                                  current:
                                    type: integer
                                  limit:
                                    type: "null"
                                  iso_currency_code:
                                    type: string
                                  unofficial_currency_code:
                                    type: "null"
                              mask:
                                type: string
                              name:
                                type: string
                              official_name:
                                type: string
                              subtype:
                                type: string
                              type:
                                type: string
                        numbers:
                          type: object
                          properties:
                            ach:
                              type: array
                              items:
                                type: object
                                properties:
                                  account:
                                    type: string
                                  account_id:
                                    type: string
                                  routing:
                                    type: string
                                  wire_routing:
                                    type: string
                            eft:
                              type: array
                              items:
                                type: object
                                properties:
                                  account:
                                    type: string
                                  account_id:
                                    type: string
                                  institution:
                                    type: string
                                  branch:
                                    type: string
                            international:
                              type: array
                              items:
                                type: object
                                properties:
                                  account_id:
                                    type: string
                                  bic:
                                    type: string
                                  iban:
                                    type: string
                            bacs:
                              type: array
                              items:
                                type: object
                                properties:
                                  account:
                                    type: string
                                  account_id:
                                    type: string
                                  sort_code:
                                    type: string
                        item:
                          type: object
                          properties:
                            available_products:
                              type: array
                              items:
                                type: object
                            billed_products:
                              type: array
                              items:
                                type: object
                            consent_expiration_time:
                              type: "null"
                            error:
                              type: "null"
                            institution_id:
                              type: string
                            item_id:
                              type: string
                            update_type:
                              type: string
                            webhook:
                              type: string
                        request_id:
                          type: string
                    balanceResponse:
                      type: object
                      properties:
                        accounts:
                          type: array
                          items:
                            type: object
                            properties:
                              account_id:
                                type: string
                              balances:
                                type: object
                                properties:
                                  available:
                                    type: integer
                                  current:
                                    type: integer
                                  iso_currency_code:
                                    type: string
                              mask:
                                type: string
                              name:
                                type: string
                              official_name:
                                type: string
                              subtype:
                                type: string
                              type:
                                type: string
                        item:
                          type: object
                          properties:
                            available_products:
                              type: array
                              items:
                                type: object
                            billed_products:
                              type: array
                              items:
                                type: object
                            institution_id:
                              type: string
                            item_id:
                              type: string
                            products:
                              type: array
                              items:
                                type: object
                            update_type:
                              type: string
                            webhook:
                              type: string
                        request_id:
                          type: string
                    identityResponse:
                      type: object
                      properties:
                        accounts:
                          type: array
                          items:
                            type: object
                            properties:
                              account_id:
                                type: string
                              balances:
                                type: object
                                properties:
                                  available:
                                    type: integer
                                  current:
                                    type: integer
                                  iso_currency_code:
                                    type: string
                                  limit:
                                    type: "null"
                                  unofficial_currency_code:
                                    type: "null"
                              mask:
                                type: string
                              name:
                                type: string
                              official_name:
                                type: string
                              owners:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    addresses:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          data:
                                            type: object
                                            properties:
                                              city:
                                                type: string
                                              country:
                                                type: string
                                              postal_code:
                                                type: string
                                              region:
                                                type: string
                                              street:
                                                type: string
                                          primary:
                                            type: boolean
                                    emails:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          data:
                                            type: string
                                          primary:
                                            type: boolean
                                          type:
                                            type: string
                                    names:
                                      type: array
                                      items:
                                        type: object
                                    phone_numbers:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          data:
                                            type: string
                                          primary:
                                            type: boolean
                                          type:
                                            type: string
                              subtype:
                                type: string
                              type:
                                type: string
                        item:
                          type: object
                          properties:
                            available_products:
                              type: array
                              items:
                                type: object
                            billed_products:
                              type: array
                              items:
                                type: object
                            consent_expiration_time:
                              type: "null"
                            error:
                              type: "null"
                            institution_id:
                              type: string
                            item_id:
                              type: string
                            update_type:
                              type: string
                            webhook:
                              type: string
                        request_id:
                          type: string
                    assetsReportResponse:
                      type: object
                      properties:
                        report:
                          type: object
                          properties:
                            asset_report_id:
                              type: string
                            client_report_id:
                              type: string
                            date_generated:
                              type: string
                            days_requested:
                              type: integer
                            items:
                              type: array
                              items:
                                type: object
                                properties:
                                  accounts:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        account_id:
                                          type: string
                                        balances:
                                          type: object
                                          properties:
                                            available:
                                              type:
                                                - integer
                                                - "null"
                                            current:
                                              type: integer
                                            iso_currency_code:
                                              type: string
                                            limit:
                                              type: "null"
                                            unofficial_currency_code:
                                              type: "null"
                                        days_available:
                                          type: integer
                                        historical_balances:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              current:
                                                type: integer
                                              date:
                                                type: string
                                              iso_currency_code:
                                                type: string
                                              unofficial_currency_code:
                                                type: "null"
                                        mask:
                                          type: string
                                        name:
                                          type: string
                                        official_name:
                                          type:
                                            - string
                                            - "null"
                                        owners:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              addresses:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    data:
                                                      type: object
                                                      properties:
                                                        city:
                                                          type: string
                                                        country:
                                                          type: string
                                                        postal_code:
                                                          type: string
                                                        region:
                                                          type: string
                                                        street:
                                                          type: string
                                                    primary:
                                                      type: boolean
                                              emails:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    data:
                                                      type: string
                                                    primary:
                                                      type: boolean
                                                    type:
                                                      type: string
                                              names:
                                                type: array
                                                items:
                                                  type: string
                                              phone_numbers:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    data:
                                                      type: string
                                                    primary:
                                                      type: boolean
                                                    type:
                                                      type: string
                                        ownership_type:
                                          type: "null"
                                        subtype:
                                          type: string
                                        transactions:
                                          type: array
                                          items:
                                            type: object
                                        type:
                                          type: string
                                  date_last_updated:
                                    type: string
                                  institution_id:
                                    type: string
                                  institution_name:
                                    type: string
                                  item_id:
                                    type: string
                            user:
                              type: object
                              properties:
                                client_user_id:
                                  type: string
                                email:
                                  type: string
                                first_name:
                                  type: string
                                last_name:
                                  type: string
                                middle_name:
                                  type: string
                                phone_number:
                                  type: string
                                ssn:
                                  type: string
                        request_id:
                          type: string
                        warnings:
                          type: array
                          items:
                            type: object
              x-examples:
                example-1:
                  sessionKey: string
                  customerId: string
                  plaidData:
                    transactionsResponse:
                      accounts:
                        - account_id: string
                          balances:
                            available: 0
                            current: 0
                            iso_currency_code: string
                            limit: null
                            unofficial_currency_code: null
                          mask: string
                          name: string
                          official_name: string
                          subtype: string
                          type: string
                      transactions:
                        - account_id: string
                          amount: 0
                          iso_currency_code: string
                          unofficial_currency_code: null
                          category:
                            - {}
                          category_id: string
                          check_number: null
                          date: string
                          datetime: null
                          authorized_date: string
                          authorized_datetime: null
                          location:
                            address: string
                            city: string
                            region: string
                            postal_code: string
                            country: string
                            lat: 0
                            lon: 0
                            store_number: string
                          name: string
                          merchant_name: string
                          payment_meta:
                            by_order_of: null
                            payee: null
                            payer: null
                            payment_method: null
                            payment_processor: null
                            ppd_id: null
                            reason: null
                            reference_number: null
                          payment_channel: string
                          pending: true
                          pending_transaction_id: null
                          account_owner: null
                          transaction_id: string
                          transaction_code: null
                          transaction_type: string
                      item:
                        available_products:
                          - {}
                        billed_products:
                          - {}
                        consent_expiration_time: null
                        error: null
                        institution_id: string
                        item_id: string
                        update_type: string
                        webhook: string
                      total_transactions: 0
                      request_id: string
                    authResponse:
                      accounts:
                        - account_id: string
                          balances:
                            available: 0
                            current: 0
                            limit: null
                            iso_currency_code: string
                            unofficial_currency_code: null
                          mask: string
                          name: string
                          official_name: string
                          subtype: string
                          type: string
                      numbers:
                        ach:
                          - account: string
                            account_id: string
                            routing: string
                            wire_routing: string
                        eft:
                          - account: string
                            account_id: string
                            institution: string
                            branch: string
                        international:
                          - account_id: string
                            bic: string
                            iban: string
                        bacs:
                          - account: string
                            account_id: string
                            sort_code: string
                      item:
                        available_products:
                          - {}
                        billed_products:
                          - {}
                        consent_expiration_time: null
                        error: null
                        institution_id: string
                        item_id: string
                        update_type: string
                        webhook: string
                      request_id: string
                    balanceResponse:
                      accounts:
                        - account_id: string
                          balances:
                            available: 0
                            current: 0
                            iso_currency_code: string
                          mask: string
                          name: string
                          official_name: string
                          subtype: string
                          type: string
                      item:
                        available_products:
                          - {}
                        billed_products:
                          - {}
                        institution_id: string
                        item_id: string
                        products:
                          - {}
                        update_type: string
                        webhook: string
                      request_id: string
                    identityResponse:
                      accounts:
                        - account_id: string
                          balances:
                            available: 0
                            current: 0
                            iso_currency_code: string
                            limit: null
                            unofficial_currency_code: null
                          mask: string
                          name: string
                          official_name: string
                          owners:
                            - addresses:
                                - data:
                                    city: string
                                    country: string
                                    postal_code: string
                                    region: string
                                    street: string
                                  primary: true
                              emails:
                                - data: string
                                  primary: true
                                  type: string
                              names:
                                - {}
                              phone_numbers:
                                - data: string
                                  primary: true
                                  type: string
                          subtype: string
                          type: string
                      item:
                        available_products:
                          - {}
                        billed_products:
                          - {}
                        consent_expiration_time: null
                        error: null
                        institution_id: string
                        item_id: string
                        update_type: string
                        webhook: string
                      request_id: string
                    assetsReportResponse:
                      report:
                        asset_report_id: bf3a0490-344c-4620-a219-2693162e4b1d
                        client_report_id: 123abc
                        date_generated: "2020-06-05T22:47:53Z"
                        days_requested: 3
                        items:
                          - accounts:
                              - account_id: 3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr
                                balances:
                                  available: 200
                                  current: 210
                                  iso_currency_code: USD
                                  limit: null
                                  unofficial_currency_code: null
                                days_available: 3
                                historical_balances:
                                  - current: 210
                                    date: "2020-06-04"
                                    iso_currency_code: USD
                                    unofficial_currency_code: null
                                  - current: 210
                                    date: "2020-06-03"
                                    iso_currency_code: USD
                                    unofficial_currency_code: null
                                  - current: 210
                                    date: "2020-06-02"
                                    iso_currency_code: USD
                                    unofficial_currency_code: null
                                mask: "1111"
                                name: Plaid Saving
                                official_name:
                                  Plaid Silver Standard 0.1% Interest Saving
                                owners:
                                  - addresses:
                                      - data:
                                          city: Malakoff
                                          country: US
                                          postal_code: "14236"
                                          region: NY
                                          street: 2992 Cameron Road
                                        primary: true
                                      - data:
                                          city: San Matias
                                          country: US
                                          postal_code: 93405-2255
                                          region: CA
                                          street: 2493 Leisure Lane
                                        primary: false
                                    emails:
                                      - data: accountholder0@example.com
                                        primary: true
                                        type: primary
                                      - data: accountholder1@example.com
                                        primary: false
                                        type: secondary
                                      - data: extraordinarily.long.email.username.123456@reallylonghostname.com
                                        primary: false
                                        type: other
                                    names:
                                      - Alberta Bobbeth Charleson
                                    phone_numbers:
                                      - data: "1112223333"
                                        primary: false
                                        type: home
                                      - data: "1112224444"
                                        primary: false
                                        type: work
                                      - data: "1112225555"
                                        primary: false
                                        type: mobile
                                ownership_type: null
                                subtype: savings
                                transactions: []
                                type: depository
                              - account_id: BxBXxLj1m4HMXBm9WZJyUg9XLd4rKEhw8Pb1J
                                balances:
                                  available: null
                                  current: 56302.06
                                  iso_currency_code: USD
                                  limit: null
                                  unofficial_currency_code: null
                                days_available: 3
                                historical_balances: []
                                mask: "8888"
                                name: Plaid Mortgage
                                official_name: null
                                owners:
                                  - addresses:
                                      - data:
                                          city: Malakoff
                                          country: US
                                          postal_code: "14236"
                                          region: NY
                                          street: 2992 Cameron Road
                                        primary: true
                                      - data:
                                          city: San Matias
                                          country: US
                                          postal_code: 93405-2255
                                          region: CA
                                          street: 2493 Leisure Lane
                                        primary: false
                                    emails:
                                      - data: accountholder0@example.com
                                        primary: true
                                        type: primary
                                      - data: accountholder1@example.com
                                        primary: false
                                        type: secondary
                                      - data: extraordinarily.long.email.username.123456@reallylonghostname.com
                                        primary: false
                                        type: other
                                    names:
                                      - Alberta Bobbeth Charleson
                                    phone_numbers:
                                      - data: "1112223333"
                                        primary: false
                                        type: home
                                      - data: "1112224444"
                                        primary: false
                                        type: work
                                      - data: "1112225555"
                                        primary: false
                                        type: mobile
                                ownership_type: null
                                subtype: mortgage
                                transactions: []
                                type: loan
                              - account_id: dVzbVMLjrxTnLjX4G66XUp5GLklm4oiZy88yK
                                balances:
                                  available: null
                                  current: 410
                                  iso_currency_code: USD
                                  limit: null
                                  unofficial_currency_code: null
                                days_available: 3
                                historical_balances:
                                  - current: 410
                                    date: "2020-06-04"
                                    iso_currency_code: USD
                                    unofficial_currency_code: null
                                  - current: 410
                                    date: "2020-06-03"
                                    iso_currency_code: USD
                                    unofficial_currency_code: null
                                  - current: 410
                                    date: "2020-06-02"
                                    iso_currency_code: USD
                                    unofficial_currency_code: null
                                mask: "3333"
                                name: Plaid Credit Card
                                official_name:
                                  Plaid Diamond 12.5% APR Interest Credit Card
                                owners:
                                  - addresses:
                                      - data:
                                          city: Malakoff
                                          country: US
                                          postal_code: "14236"
                                          region: NY
                                          street: 2992 Cameron Road
                                        primary: true
                                      - data:
                                          city: San Matias
                                          country: US
                                          postal_code: 93405-2255
                                          region: CA
                                          street: 2493 Leisure Lane
                                        primary: false
                                    emails:
                                      - data: accountholder0@example.com
                                        primary: true
                                        type: primary
                                      - data: accountholder1@example.com
                                        primary: false
                                        type: secondary
                                      - data: extraordinarily.long.email.username.123456@reallylonghostname.com
                                        primary: false
                                        type: other
                                    names:
                                      - Alberta Bobbeth Charleson
                                    phone_numbers:
                                      - data: "1112223333"
                                        primary: false
                                        type: home
                                      - data: "1112224444"
                                        primary: false
                                        type: work
                                      - data: "1112225555"
                                        primary: false
                                        type: mobile
                                ownership_type: null
                                subtype: credit card
                                transactions: []
                                type: credit
                            date_last_updated: "2020-06-05T22:47:52Z"
                            institution_id: ins_3
                            institution_name: Chase
                            item_id: eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6
                        user:
                          client_user_id: "123456789"
                          email: accountholder0@example.com
                          first_name: Alberta
                          last_name: Charleson
                          middle_name: Bobbeth
                          phone_number: 111-222-3333
                          ssn: 123-45-6789
                      request_id: eYupqX1mZkEuQRx
                      warnings: []
            examples:
              example-1:
                value:
                  sessionKey: string
                  customerId: string
                  plaidData:
                    transactionsResponse:
                      accounts:
                        - account_id: string
                          balances:
                            available: 0
                            current: 0
                            iso_currency_code: string
                            limit: null
                            unofficial_currency_code: null
                          mask: string
                          name: string
                          official_name: string
                          subtype: string
                          type: string
                      transactions:
                        - account_id: string
                          amount: 0
                          iso_currency_code: string
                          unofficial_currency_code: null
                          category:
                            - {}
                          category_id: string
                          check_number: null
                          date: string
                          datetime: null
                          authorized_date: string
                          authorized_datetime: null
                          location:
                            address: string
                            city: string
                            region: string
                            postal_code: string
                            country: string
                            lat: 0
                            lon: 0
                            store_number: string
                          name: string
                          merchant_name: string
                          payment_meta:
                            by_order_of: null
                            payee: null
                            payer: null
                            payment_method: null
                            payment_processor: null
                            ppd_id: null
                            reason: null
                            reference_number: null
                          payment_channel: string
                          pending: true
                          pending_transaction_id: null
                          account_owner: null
                          transaction_id: string
                          transaction_code: null
                          transaction_type: string
                      item:
                        available_products:
                          - {}
                        billed_products:
                          - {}
                        consent_expiration_time: null
                        error: null
                        institution_id: string
                        item_id: string
                        update_type: string
                        webhook: string
                      total_transactions: 0
                      request_id: string
                    authResponse:
                      accounts:
                        - account_id: string
                          balances:
                            available: 0
                            current: 0
                            limit: null
                            iso_currency_code: string
                            unofficial_currency_code: null
                          mask: string
                          name: string
                          official_name: string
                          subtype: string
                          type: string
                      numbers:
                        ach:
                          - account: string
                            account_id: string
                            routing: string
                            wire_routing: string
                        eft:
                          - account: string
                            account_id: string
                            institution: string
                            branch: string
                        international:
                          - account_id: string
                            bic: string
                            iban: string
                        bacs:
                          - account: string
                            account_id: string
                            sort_code: string
                      item:
                        available_products:
                          - {}
                        billed_products:
                          - {}
                        consent_expiration_time: null
                        error: null
                        institution_id: string
                        item_id: string
                        update_type: string
                        webhook: string
                      request_id: string
                    balanceResponse:
                      accounts:
                        - account_id: string
                          balances:
                            available: 0
                            current: 0
                            iso_currency_code: string
                          mask: string
                          name: string
                          official_name: string
                          subtype: string
                          type: string
                      item:
                        available_products:
                          - {}
                        billed_products:
                          - {}
                        institution_id: string
                        item_id: string
                        products:
                          - {}
                        update_type: string
                        webhook: string
                      request_id: string
                    identityResponse:
                      accounts:
                        - account_id: string
                          balances:
                            available: 0
                            current: 0
                            iso_currency_code: string
                            limit: null
                            unofficial_currency_code: null
                          mask: string
                          name: string
                          official_name: string
                          owners:
                            - addresses:
                                - data:
                                    city: string
                                    country: string
                                    postal_code: string
                                    region: string
                                    street: string
                                  primary: true
                              emails:
                                - data: string
                                  primary: true
                                  type: string
                              names:
                                - {}
                              phone_numbers:
                                - data: string
                                  primary: true
                                  type: string
                          subtype: string
                          type: string
                      item:
                        available_products:
                          - {}
                        billed_products:
                          - {}
                        consent_expiration_time: null
                        error: null
                        institution_id: string
                        item_id: string
                        update_type: string
                        webhook: string
                      request_id: string
                    assetsReportResponse:
                      report:
                        asset_report_id: string
                        client_report_id: string
                        date_generated: string
                        days_requested: 0
                        items:
                          - accounts:
                              - account_id: string
                                balances:
                                  available: 0
                                  current: 0
                                  iso_currency_code: string
                                  limit: null
                                  unofficial_currency_code: null
                                days_available: 0
                                historical_balances:
                                  - current: 0
                                    date: string
                                    iso_currency_code: string
                                    unofficial_currency_code: null
                                mask: string
                                name: string
                                official_name: null
                                owners:
                                  - addresses:
                                      - data:
                                          city: string
                                          country: string
                                          postal_code: string
                                          region: string
                                          street: string
                                        primary: true
                                    emails:
                                      - data: string
                                        primary: true
                                        type: string
                                    names:
                                      - string
                                    phone_numbers:
                                      - data: string
                                        primary: true
                                        type: string
                                ownership_type: null
                                subtype: string
                                transactions:
                                  - {}
                                type: string
                            date_last_updated: string
                            institution_id: string
                            institution_name: string
                            item_id: string
                        user:
                          client_user_id: string
                          email: string
                          first_name: string
                          last_name: string
                          middle_name: string
                          phone_number: string
                          ssn: string
                      request_id: string
                      warnings:
                        - {}
      responses: {}
      security:
        - {}
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: qw6jod44uaxs2
  /geo-coverage:
    get:
      summary: Get Geocoverage
      description:
        "Get list of regions where Sardine is supported, separated by county and
        state regions"
      operationId: get-geo
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    minItems: 1
                    uniqueItems: true
                    items:
                      type: object
                      properties:
                        countryCode:
                          type: string
                          description: 2 letter code representing a country
                          minLength: 1
                          examples:
                            - US
                        isAllowed:
                          type: boolean
                        isBasicKycAllowed:
                          type: boolean
                          description:
                            KYC requirements are satisfied without needing a
                            document proof
                        name:
                          type: string
                          minLength: 1
                        supportedDocuments:
                          type: array
                          items:
                            type: string
                        currencyCode:
                          type: string
                          minLength: 1
                          examples:
                            - USD
                        paymentMethods:
                          type: array
                          minItems: 1
                          uniqueItems: true
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                minLength: 1
                              type:
                                type: string
                              isAllowed:
                                type: boolean
                        states:
                          type: object
                          properties:
                            code:
                              type: string
                            name:
                              type: string
                            isAllowed:
                              type: boolean
                x-examples:
                  example-1:
                    response:
                      - alpha2: DZ
                        alpha3: DZA
                        isAllowed: true
                        isLightKycAllowed: true
                        name: Algeria
                        supportedDocuments:
                          - passport
                        currencyCode: DZD
                        partners:
                          - name: wyre
                            isCardPayment: true
                            currencyCode: USD
              examples:
                example-1:
                  value:
                    data:
                      - countryCode: US
                        isAllowed: true
                        isBasicKycAllowed: true
                        name: United States of America
                        supportedDocuments:
                          - passport
                          - drivers license
                          - identity card
                        currencyCode: USD
                        paymentMethods:
                          - name: ach
                            type: bank
                            isAllowed: true
                        states:
                          - code: US-AL
                            name: Alabama
                            isAllowed: true
                          - code: US-AK
                            name: Alaska
                            isAllowed: true
                          - code: US-AZ
                            name: Arizona
                            isAllowed: true
                          - code: US-AR
                            name: Arkansas
                            isAllowed: true
                          - code: US-CA
                            name: California
                            isAllowed: true
                          - code: US-CO
                            name: Colorado
                            isAllowed: true
                          - code: US-CT
                            name: Connecticut
                            isAllowed: true
                          - code: US-DE
                            name: Delaware
                            isAllowed: true
                          - code: US-DC
                            name: District of Columbia
                            isAllowed: true
                          - code: US-FL
                            name: Florida
                            isAllowed: true
                          - code: US-GA
                            name: Georgia
                            isAllowed: true
                          - code: US-HI
                            name: Hawaii
                            isAllowed: false
                          - code: US-ID
                            name: Idaho
                            isAllowed: true
                          - code: US-IL
                            name: Illinois
                            isAllowed: true
                          - code: US-IN
                            name: Indiana
                            isAllowed: true
                          - code: US-IA
                            name: Iowa
                            isAllowed: true
                          - code: US-KS
                            name: Kansas
                            isAllowed: true
                          - code: US-KY
                            name: Kentucky
                            isAllowed: true
                          - code: US-LA
                            name: Louisiana
                            isAllowed: true
                          - code: US-ME
                            name: Maine
                            isAllowed: true
                          - code: US-MD
                            name: Maryland
                            isAllowed: true
                          - code: US-MA
                            name: Massachusetts
                            isAllowed: true
                          - code: US-MI
                            name: Michigan
                            isAllowed: true
                          - code: US-MN
                            name: Minnesota
                            isAllowed: true
                          - code: US-MS
                            name: Mississippi
                            isAllowed: true
                          - code: US-MO
                            name: Missouri
                            isAllowed: true
                          - code: US-MT
                            name: Montana
                            isAllowed: true
                          - code: US-NE
                            name: Nebraska
                            isAllowed: true
                          - code: US-NV
                            name: Nevada
                            isAllowed: true
                          - code: US-NH
                            name: New Hampshire
                            isAllowed: true
                          - code: US-NJ
                            name: New Jersey
                            isAllowed: true
                          - code: US-NM
                            name: New Mexico
                            isAllowed: true
                          - code: US-NY
                            name: New York
                            isAllowed: false
                          - code: US-NC
                            name: North Carolina
                            isAllowed: true
                          - code: US-ND
                            name: North Dakota
                            isAllowed: true
                          - code: US-OH
                            name: Ohio
                            isAllowed: true
                          - code: US-OK
                            name: Oklahoma
                            isAllowed: true
                          - code: US-OR
                            name: Oregon
                            isAllowed: true
                          - code: US-PA
                            name: Pennsylvania
                            isAllowed: true
                          - code: US-PR
                            name: Puerto Rico
                            isAllowed: true
                          - code: US-RI
                            name: Rhode Island
                            isAllowed: true
                          - code: US-SC
                            name: South Carolina
                            isAllowed: true
                          - code: US-SD
                            name: South Dakota
                            isAllowed: true
                          - code: US-TN
                            name: Tennessee
                            isAllowed: true
                          - code: US-TX
                            name: Texas
                            isAllowed: true
                          - code: US-UT
                            name: Utah
                            isAllowed: true
                          - code: US-VT
                            name: Vermont
                            isAllowed: true
                          - code: US-VA
                            name: Virginia
                            isAllowed: true
                          - code: US-VI
                            name: Virgin Islands (U.S.)
                            isAllowed: true
                          - code: US-WA
                            name: Washington
                            isAllowed: true
                          - code: US-WV
                            name: West Virginia
                            isAllowed: true
                          - code: US-WI
                            name: Wisconsin
                            isAllowed: true
                          - code: US-WY
                            name: Wyoming
                            isAllowed: true
      security:
        - ClientToken: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: g0c278csvyuja
  /fiat-currencies:
    get:
      summary: Get fiat currencies
      description: List of fiat currencies supported by Sardine
      operationId: get-trade-get-fiat-currencies
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      symbol:
                        type: string
                        description: Symbol of currency
                        examples:
                          - USD
                      supportingCountries:
                        type: array
                        description:
                          List of countries which support this currency
                        items:
                          type: string
                          examples:
                            - US
                      name:
                        type: string
                        description: Name of currency
                        examples:
                          - US Dollar
                      paymentOptions:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Name of payment method
                              examples:
                                - ACH
                            processingTime:
                              type: string
                              description:
                                Description of time taken for funds to settle
                              examples:
                                - Instant - 3 days
                            dailyLimit:
                              type: integer
                              description:
                                "Amount of the currency that can be transacted
                                in a day, in minor units i.e. cents if currency
                                is US dollars"
                              minimum: 0
                              examples:
                                - 30000
                            maxAmount:
                              type: integer
                              description:
                                "The maximum amount of the currency that can be
                                passed in a transaction, in minor units i.e.
                                cents if currency is US dollars"
                              examples:
                                - 30000
                            minAmount:
                              type: integer
                              description:
                                "The minimum amount of the currency that will be
                                supported, in minor units i.e. cents if currency
                                is US dollars"
                              examples:
                                - 5000
                x-examples:
                  example-1:
                    response:
                      symbol: USD
                      supportingCountries:
                        - US
                      name: US Dollar
                      paymentOptions:
                        - name: ACH
                          id: "1"
                          processingTime: Instant - 3 days
                          displayText: true
                          icon: string
                          dailyLimit: 300000
                          maxAmount: 300000
                          minAmount: 5000
                      isAllowed: true
                      defaultAmount: 20000
                      icon: string
              examples:
                example-1:
                  value:
                    data:
                      symbol: USD
                      supportingCountries:
                        - US
                      name: US Dollar
                      paymentOptions:
                        - name: ACH
                          processingTime: Instant - 3 days
                          dailyLimit: 30000
                          maxAmount: 30000
                          minAmount: 5000
      security:
        - ClientToken: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-internal: true
      x-stoplight:
        id: 0bo3wa6w4iyst
  "/payouts/{payout_id}":
    get:
      summary: Fetch Payout Information
      description: |-
        Fetch payouts information by `order_id` or `payout_id`

        1. By `order_id`

        Make a GET request to /payouts/order_id={}

        2. By `payout_id`

        Make a GET request to /payouts/{payout_id}
      operationId: get-payouts
      parameters:
        - name: order_id
          in: query
          description: Order ID associated with the payout
          schema:
            type: string
            format: uuid
        - name: payout_id
          in: path
          required: true
          description: Payout ID associated with a specific payout
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: string
                    description: Order ID associated with the Payout
                  total:
                    type: number
                    description: Total amount in fiat USD that was paid out
                  referenceId:
                    type: string
                    description:
                      Unique uuid passed by merchant when creating the Payout
                  payouts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique ID of Payout
                        orderId:
                          type: string
                          description: Order ID the Payout is associated with
                        status:
                          type: string
                          enum:
                            - funded
                            - declined
                            - complete
                          description: Status of the Payout
                        payoutType:
                          const: crypto
                          description: "Type of payout, restricted to `crypto`"
                        receipt:
                          type: object
                          properties:
                            walletAddress:
                              type: string
                              description:
                                Wallet address that receives the Payout
                            assetSymbol:
                              type: string
                              description:
                                "Type of cryptocurrency that the Payout occurs
                                in. "
                            assetAmount:
                              type: integer
                              description:
                                Amount in `assetSymbol` that is paid out
                            network:
                              type: string
                              description:
                                Blockchain network on which the Payout occurs
                            txHash:
                              type:
                                - string
                                - "null"
                              description:
                                Transaction hash that is set once the
                                transaction settles on chain
                x-examples:
                  Example 1:
                    orderId: a9a54943-468a-4e0c-9d3d-84b7dbc663f0
                    orderValue: 20
                    payouts:
                      - id: 7fea91c2-a491-49fb-9312-d372f4334ce1
                        orderId: a9......
                        status: FUNDED
                        payoutType: CRYPTO
                        receipt:
                          walletAddress: 0x...
                          assetSymbol: USDC
                          assetAmount: 15
                          network: polygon
                          txHash:
                            null // Will be null immediately after POST request
                      - id: 887d8f92-f129-4ecb-b909-0e12aff70e74
                        status: FUNDED
                        payoutType: CRYPTO
                        receipt:
                          walletAddress: 0x...
                          assetSymbol: USDC
                          assetAmount: 5
                          network: polygon
                          txHash: null
              examples:
                Fetch all payouts for an Order:
                  value:
                    orderId: a9a54943-468a-4e0c-9d3d-84b7dbc663f0
                    total: 20
                    payouts:
                      - id: 7fea91c2-a491-49fb-9312-d372f4334ce1
                        orderId: a9a54943-468a-4e0c-9d3d-84b7dbc663f0
                        status: FUNDED
                        payoutType: CRYPTO
                        receipt:
                          walletAddress: 0x...
                          assetSymbol: USDC
                          assetAmount: 15
                          network: polygon
                          txHash: null
                      - id: 887d8f92-f129-4ecb-b909-0e12aff70e74
                        status: FUNDED
                        payoutType: CRYPTO
                        orderId: a9a54943-468a-4e0c-9d3d-84b7dbc663f0
                        receipt:
                          walletAddress: 0x...
                          assetSymbol: USDC
                          assetAmount: 5
                          network: polygon
                          txHash: null
                Fetch a single payout:
                  value:
                    id: ffb97f3a-93c5-49ee-854d-e4edaba7c232
                    payoutType: CRYPTO
                    status: COMPLETE
                    orderId: a9a54943-468a-4e0c-9d3d-84b7dbc663f0
                    receipt:
                      address: "0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5"
                      assetSymbol: USDC
                      assetAmount: 150
                      network: polygon
                      txHash: 0x0553b035e1d2e8672299daa824710cd740b076229936ee0decb2cae089c7111t
      security:
        - ClientToken: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-stoplight:
        id: of9mfx5xf2olz
  /payouts:
    post:
      summary: Create Payout
      description: |-
        Create a Payout where Sardine will send crypto to specified wallet(s) in specified cryptocurrencies. 

        A Payout can be created associated with a corresponding fiat order (where Sardine has also done the fiat processing) or without one (where Sardine does not do the fiat component). 

        To trigger Payouts without the fiat processing being done by Sardine, contact your Integration team.
      operationId: post-payouts-payout_id
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              type: object
              properties:
                referenceId:
                  type: string
                  description:
                    Optional unique ID that can be passed to refer to the
                    Payout. Must be unique for every Payout
                orderId:
                  type: string
                  description:
                    "Order ID generated by Sardine for the fiat part of the
                    transaction. Must be passed if Sardine has done the fiat
                    processing. "
                fiatValue:
                  type: object
                  description:
                    Only to be passed if an associated `OrderId` is not present
                  properties:
                    fiatAmount:
                      type: number
                      description: Amount in fiat that needs to be paid out
                    fiatCurrency:
                      type: string
                      description: Fiat currency type
                payoutConfiguration:
                  type: object
                  properties:
                    recipients:
                      type: array
                      items:
                        type: object
                        properties:
                          percentageOfTotal:
                            type: number
                            description:
                              The percentage of the `fiatAmount` that should be
                              paid out to this recipient
                          payoutType:
                            const: crypto
                            description:
                              "Type of payout, currently restricted to `crypto`"
                          walletData:
                            type: object
                            properties:
                              network:
                                type: string
                                description:
                                  Blockchain on which the payout should occur
                              assetSymbol:
                                type: string
                                description:
                                  Type of cryptocurrency on which the payout
                                  should occur
                              walletAddress:
                                type: string
                                description:
                                  "Wallet address on the `network` that is
                                  receiving the payout. "
              x-examples:
                Example 1:
                  referenceId: 04ce75d2-fdce-4624-9566-a4783855324d
                  orderId: a9a54943-468a-4e0c-9d3d-84b7dbc663f0
                  fiatValue:
                    fiatAmount: 20
                    fiatCurrency: USD
                  payoutConfiguration:
                    recipients:
                      - percentageOfTotal: 75
                        payoutType: CRYPTO
                        walletData:
                          network: polygon
                          assetSymbol: USDC
                          walletAddress: 0x...
                      - percentageOfTotal: 25
                        payoutType: crypto
                        walletData:
                          network: polygon
                          assetSymbol: USDC
                          walletAddress: 0x...
            examples:
              Create Payout in USDC on Polygon with equal splits to two wallets:
                {}
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: string
                    description: Order ID if present in request
                  orderValue:
                    type: integer
                    description: Sum of the payouts amount
                  payouts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique Payout ID
                        orderId:
                          type: string
                          description: Order ID associated with this Payout
                        status:
                          type: string
                          enum:
                            - funded
                            - declined
                            - complete
                          description: Status of Payout
                        payoutType:
                          type: string
                          description:
                            "Type of payout, currently restricted to `crypto`"
                        receipt:
                          type: object
                          properties:
                            walletAddress:
                              type: string
                              description: Wallet address receiving the payout
                            assetSymbol:
                              type: string
                              description:
                                Type of cryptocurrency that Payout is made in
                            assetAmount:
                              type: integer
                              description: Amount in `assetSymbol` of the Payout
                            network:
                              type: string
                              description:
                                Blockchain network on which the Payout occurs
                            txHash:
                              type:
                                - string
                                - "null"
                              description:
                                "Transaction hash once the Payout has settled on
                                chain, and funds have been delivered to the
                                `walletAddress`"
                x-examples:
                  Example 1:
                    orderId: a9a54943-468a-4e0c-9d3d-84b7dbc663f0
                    orderValue: 20
                    payouts:
                      - id: 7fea91c2-a491-49fb-9312-d372f4334ce1
                        orderId: a9......
                        status: FUNDED
                        payoutType: CRYPTO
                        receipt:
                          walletAddress: 0x...
                          assetSymbol: USDC
                          assetAmount: 50
                          network: polygon
                          txHash: null
                      - id: 887d8f92-f129-4ecb-b909-0e12aff70e74
                        status: FUNDED
                        payoutType: CRYPTO
                        receipt:
                          walletAddress: 0x...
                          assetSymbol: USDC
                          assetAmount: 50
                          network: polygon
                          txHash: null
              examples:
                ? "Create Payout in USDC on Polygon to two wallets, split
                  equally"
                : value:
                    orderId: a9a54943-468a-4e0c-9d3d-84b7dbc663f0
                    orderValue: 20
                    payouts:
                      - id: 7fea91c2-a491-49fb-9312-d372f4334ce1
                        orderId: a9......
                        status: FUNDED
                        payoutType: CRYPTO
                        receipt:
                          walletAddress: 0x...
                          assetSymbol: USDC
                          assetAmount: 15
                          network: polygon
                          txHash:
                            null // Will be null immediately after POST request
                      - id: 887d8f92-f129-4ecb-b909-0e12aff70e74
                        status: FUNDED
                        payoutType: CRYPTO
                        receipt:
                          walletAddress: 0x...
                          assetSymbol: USDC
                          assetAmount: 5
                          network: polygon
                          txHash: null
      security:
        - ClientToken: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-stoplight:
        id: 63br0cn0tj2ul
  /orders/events:
    get:
      summary: Update NFT Status
      operationId: get-orders-events
      responses: {}
      security:
        - ClientToken: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-stoplight:
        id: nwsrkzirb4bve
    post:
      summary: Update Order
      operationId: post-orders-events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  const: Delivered
                orderId:
                  type: string
                  description:
                    Order ID created when transaction is processed by Sardine
                referenceId:
                  type: string
                  description:
                    Reference ID passed. Either `referenceId` or `orderId` must
                    be present
                transactionHash:
                  type: string
                  description:
                    Transaction hash associated with the delivery of Digital
                    asset to customer
              required:
                - type
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
      security:
        - ClientToken: []
      servers:
        - url: "https://api.sandbox.sardine.ai/v1"
          description: Sandbox
        - url: "https://api.sardine.ai/v1"
          description: Prod Server
      x-stoplight:
        id: 3oz2slnlx69ho
components:
  securitySchemes:
    ClientToken:
      type: http
      scheme: basic
  schemas:
    Bank-Account:
      type: object
      title: Bank Account
      properties:
        bankAccountId:
          type: string
          description: Unique identifier for the given user.
          format: uuid
        accountNumber:
          type: string
          description: |
            Bank account number
          examples:
            - "98322271627"
        name:
          type: string
          description: User set name of account
          format: email
        officialName:
          type: string
          description: Bank designated name of account
          format: date
          examples:
            - "1997-10-31"
        routingNumber:
          type: string
          description: The date that the user was created.
          format: date
        subtype:
          type: string
          description: Subtype of account
        type:
          type: string
          description: "Type of account, checking, saving etc"
        wireRoutingNUmber:
          type: string
          description: Routing number for bank account
        institutionName:
          type: string
          description: Name of the bank at which the account is open
        status:
          type: string
          enum:
            - connected
            - disconnected
      examples:
        - bankAccountId: 5b26b598-a880-4e32-8c41-126aa0206857
          accountNumber: "98322271627"
          name: John Doe
          officialName: JP Morgan Chase Checking account
          routingNumber: "322271627"
          subtype: checking
          type: string
          wireRoutingNUmber: "32222171627"
          institutionName: JP Morgan Chase
          status: connected
      x-internal: true
      x-stoplight:
        id: nmynlsto9w57k
    KYC:
      type: object
      title: KYC
      properties:
        verificationId:
          type: string
          description: ID of Verification
        status:
          type: string
          description: Status of check
        documentData:
          type: object
          properties:
            type:
              type: string
              description: Type of document
            number:
              type: string
              description: Document number
            dateOfBirth:
              type: string
              description: Date of Birth
            dateOfIssue:
              type: string
              description: Issuance date of document
            dateOfExpiry:
              type: string
              description: Expiry date of document
            issuingCountry:
              type: string
              description: ISO code of country document issued in
            firstName:
              type: string
              description: First name on document
            middleName:
              type: string
              description: Middle name on document
            lastName:
              type: string
              description: Last name on document
            gender:
              type: string
              description: Gender on document
            address:
              type: string
              description: Address on document
        verification:
          type: object
          properties:
            riskLevel:
              type: string
              description: Risk level of this document
            forgeryLevel:
              type: string
              description: Forgery level
            documentMatchLevel:
              type: string
              description:
                Measure of match between document and information input by the
                user
            imageQualityLevel:
              type: string
              description: Quality of image uploaded
            faceMatchLevel:
              type: string
              description: Level of match between selfie and face in ID
      x-examples:
        example-1:
          verificationId: d67fc8a6-d930-4857-882d-00000000000
          status: complete
          documentData:
            type: driver_license
            number: S1585910
            dateOfBirth: "1981-02-17"
            dateOfIssue: "2020-02-16"
            dateOfExpiry: "2025-02-17"
            issuingCountry: US
            firstName: PARIS WHITNEY
            middleName: ""
            lastName: HILTON
            gender: female
            address: "936 SE Dolphin Dr, Stuart, Florida 34996"
          verification:
            riskLevel: high
            forgeryLevel: low
            documentMatchLevel: not_applicable
            imageQualityLevel: high
            faceMatchLevel: not_applicable
      x-internal: true
      x-stoplight:
        id: 04xt7e5k9lcmw
    Customer:
      type: object
      title: Customer
      properties:
        sessionKey:
          type: string
          minLength: 1
          examples:
            - 280CBF35-B4B0-4193-A111
        level:
          type: string
          enum:
            - low
            - medium
            - high
            - very_high
          description:
            This is the ONLY field that a merchant needs to use to make decision
            on fraud. This field is set by our rules and the main rule is the
            rule using our "customer score" model.
          minLength: 1
        status:
          type: string
          enum:
            - Success
            - Failure
          minLength: 1
        customer:
          type: object
          properties:
            score:
              type: number
              description:
                "ML Risk Score for the current customer session. The ML model
                used to predict the score is trained on velocity and aggregation
                features, phone, email, bank, tax, card, IP, location, device
                and behavior intelligence signals. The score can be used once
                feedback for historical transactions has been provided."
              examples:
                - 26
            level:
              type: string
              enum:
                - low
                - medium
                - high
                - very_high
              description:
                This field is based on the signals sent in the response.
              minLength: 1
            signals:
              type: array
              description:
                "See
                https://docs.sardine.ai/api/reference/operation/v1-customers/"
              minItems: 1
              uniqueItems: true
              items:
                type: object
                properties:
                  key:
                    type: string
                    minLength: 1
                  value:
                    type: string
                    minLength: 1
        transaction:
          type: object
          properties:
            level:
              type: string
              enum:
                - low
                - medium
                - high
              description: transaction risk level
              minLength: 1
            amlLevel:
              type: string
              enum:
                - low
                - medium
                - high
              description: aml risk level
              minLength: 1
            indemnification:
              type: object
              properties:
                decision:
                  type: string
                  enum:
                    - approved
                    - conditionally_approved
                    - rejected
                    - unknown
                  minLength: 1
                instantLimit:
                  type: number
                  description:
                    This is the withdrawal amount in cents that is immediately
                    available to the end-user. The remaining hold amount should
                    be kept on hold on your side until the time specified by
                    holdTime parameter below.
                  examples:
                    - 1000
                holdAmount:
                  type: number
                  description:
                    This is the remaining amount in cents that is available
                    after the hold time is over. The hold time + instantLimit is
                    the total deposit amount.
                  examples:
                    - 0
                verificationCode:
                  type: string
                  minLength: 1
                holdTime:
                  type: string
                  description:
                    UNIX timestamp that represents time until you which should
                    hold part of fund
                  format: time
                  examples:
                    - "1628169754124"
      examples:
        - sessionKey: 280CBF35-B4B0-4193-A111
          level: low
          status: Success
          customer:
            score: 26
            level: low
            signals:
              - key: bankLevel
                value: low
              - key: emailDomainLevel
                value: low
              - key: emailLevel
                value: low
                reasonCodes:
                  - HST
          transaction:
            level: low
            amlLevel: low
            indemnification:
              decision: approved
              instantLimit: 1000
              holdAmount: 0
              verificationCode: string
              holdTime: "1628169754124"
      x-examples:
        example-1:
          sessionKey: string
          level: string
          status: string
          customer:
            score: 0
            level: string
            signals:
              - key: string
                value: string
          transaction:
            level: string
            amlLevel: string
            indemnification:
              decision: string
              instantLimit: 0
              holdAmount: 0
              verificationCode: string
          checkpoints:
            customer:
              customerPurchaseLevel:
                value: string
                ruleIds:
                  - {}
              emailLevel:
                value: string
                ruleIds:
                  - {}
              historicalLevel:
                value: string
                ruleIds:
                  - {}
              riskLevel:
                value: string
                ruleIds:
                  - {}
      x-internal: true
      x-stoplight:
        id: l1re9fwrwq4a1
security:
  - {}
