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

# Simulate that the Next Credential Scan Will Succeed

> Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).



## OpenAPI

````yaml /openapi.json post /acs/encoders/simulate/next_credential_scan_will_succeed
openapi: 3.0.0
info:
  title: Seam Connect
  version: 1.0.0
servers:
  - url: https://connect.getseam.com
security: []
tags:
  - description: access_codes
    name: /access_codes
  - description: acs
    name: /acs
  - description: action_attempts
    name: /action_attempts
  - description: client_sessions
    name: /client_sessions
  - description: connected_accounts
    name: /connected_accounts
  - description: connect_webviews
    name: /connect_webviews
  - description: devices
    name: /devices
  - description: events
    name: /events
  - description: health
    name: /health
  - description: locks
    name: /locks
  - description: networks
    name: /networks
  - description: noise_sensors
    name: /noise_sensors
  - description: phones
    name: /phones
  - description: thermostats
    name: /thermostats
  - description: user_identities
    name: /user_identities
  - description: webhooks
    name: /webhooks
  - description: workspaces
    name: /workspaces
paths:
  /acs/encoders/simulate/next_credential_scan_will_succeed:
    post:
      tags:
        - /acs
      summary: Simulate that the Next Credential Scan Will Succeed
      description: >-
        Simulates that the next attempt to scan a
        [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
        using the specified
        [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners)
        will succeed. You can only perform this action within a [sandbox
        workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
      operationId: acsEncodersSimulateNextCredentialScanWillSucceedPost
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - additionalProperties: false
                  properties:
                    acs_credential_id_on_seam:
                      description: >-
                        ID of the Seam `acs_credential` that matches the
                        `acs_credential` on the encoder in this simulation.
                      format: uuid
                      type: string
                    acs_encoder_id:
                      description: >-
                        ID of the `acs_encoder` that will be used in the next
                        request to scan the `acs_credential`.
                      format: uuid
                      type: string
                    scenario:
                      default: credential_exists_on_seam
                      description: Scenario to simulate.
                      enum:
                        - credential_exists_on_seam
                        - credential_on_encoder_needs_update
                      type: string
                  required:
                    - acs_encoder_id
                  type: object
                - additionalProperties: false
                  properties:
                    acs_encoder_id:
                      description: >-
                        ID of the `acs_encoder` that will be used in the next
                        request to scan the `acs_credential`.
                      format: uuid
                      type: string
                    scenario:
                      description: Scenario to simulate.
                      enum:
                        - credential_does_not_exist_on_seam
                      type: string
                  required:
                    - acs_encoder_id
                    - scenario
                  type: object
                - additionalProperties: false
                  properties:
                    acs_encoder_id:
                      description: >-
                        ID of the `acs_encoder` that will be used in the next
                        request to scan the `acs_credential`.
                      format: uuid
                      type: string
                    scenario:
                      description: Scenario to simulate.
                      enum:
                        - credential_on_encoder_is_empty
                      type: string
                  required:
                    - acs_encoder_id
                    - scenario
                  type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  ok:
                    type: boolean
                required:
                  - ok
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - api_key: []
        - pat_with_workspace: []
        - console_session_with_workspace: []
      x-codeSamples:
        - lang: javascript
          label: Seam SDK
          source: |-
            await seam.acs.encoders.simulate.nextCredentialScanWillSucceed({
              acs_encoder_id: "182ea706-8e14-4921-8e57-ee18d5a7de31",
              scenario: "credential_exists_on_seam",
              acs_credential_id_on_seam: "123e4567-e89b-12d3-a456-426614174000",
            });

            /*
            // void
            */
        - lang: bash
          label: cURL
          source: >-
            curl --include --request POST
            "https://connect.getseam.com/acs/encoders/simulate/next_credential_scan_will_succeed"
            \
              --header "Authorization: Bearer $SEAM_API_KEY" \
              --json @- <<EOF
            {
              "acs_encoder_id": "182ea706-8e14-4921-8e57-ee18d5a7de31",
              "scenario": "credential_exists_on_seam",
              "acs_credential_id_on_seam": "123e4567-e89b-12d3-a456-426614174000"
            }

            EOF


            # Response:

            # {}
        - lang: python
          label: Seam SDK
          source: |-
            seam.acs.encoders.simulate.next_credential_scan_will_succeed(
                acs_encoder_id="182ea706-8e14-4921-8e57-ee18d5a7de31",
                scenario="credential_exists_on_seam",
                acs_credential_id_on_seam="123e4567-e89b-12d3-a456-426614174000",
            )

            # None
        - lang: ruby
          label: Seam SDK
          source: |-
            seam.acs.encoders.simulate.next_credential_scan_will_succeed(
              acs_encoder_id: "182ea706-8e14-4921-8e57-ee18d5a7de31",
              scenario: "credential_exists_on_seam",
              acs_credential_id_on_seam: "123e4567-e89b-12d3-a456-426614174000",
            )

            # => nil
        - lang: php
          label: Seam SDK
          source: |-
            $seam->acs->encoders->simulate->next_credential_scan_will_succeed(
                acs_encoder_id: "182ea706-8e14-4921-8e57-ee18d5a7de31",
                scenario: "credential_exists_on_seam",
                acs_credential_id_on_seam: "123e4567-e89b-12d3-a456-426614174000",
            );
        - lang: bash
          label: Seam CLI
          source: >-
            seam acs encoders simulate next-credential-scan-will-succeed
            --acs_encoder_id "182ea706-8e14-4921-8e57-ee18d5a7de31" --scenario
            "credential_exists_on_seam" --acs_credential_id_on_seam
            "123e4567-e89b-12d3-a456-426614174000"


            # {}
components:
  securitySchemes:
    api_key:
      bearerFormat: API Key
      scheme: bearer
      type: http
    pat_with_workspace:
      bearerFormat: API Token
      scheme: bearer
      type: http
    console_session_with_workspace:
      bearerFormat: Console Session Token
      scheme: bearer
      type: http

````