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

# Create Ramp (Send Based)

> By consuming this endpoint you will be able to create a new ramp for converting your assets.

#### Headers

| Field | **Type** | Required | Description |
| --- | --- | --- | --- |
| Authorization | Header | Yes | The access token, valid for 5 minutes, is used to authenticate requests to other endpoints. |
| clientId | Query | Yes | Include your assigned **ID** in the URL, obtainable through the **Get infoClient** endpoint. |
| idempotency-key | UUID | No | A unique key that prevents duplicate execution of the same request in case of retries. |

#### Request Body

| **Field** | **Description** |
| --- | --- |
| assetIn | The symbol of the asset you will send (COP, MXN, USD, USDC, USDT) |
| assetOut | The symbol of the asset you want to receive (COP, MXN, USD, USDC, USDT). |
| amountIn | The amount of the asset you want to convert. |
| accountOriginId | The unique ID of your origin Wallet/ Bank Account you selected as the origin for the ramp you are creating. You can obtain the ID using the **Get /wallets** or **Get /accounts** endpoint. Please make sure the account status is approved. |
| accountDestinationId | The unique ID of your Wallet/Bank Account you selected as the destination for the ramp you are creating. You can obtain the ID using the **Get /wallets** or **Get /accounts** endpoint. Please make sure the account status is approved. |

#### Response

The response will include the status of the request and any relevant data related to the order created.

| **Field** | **Description** |
| --- | --- |
| Id | This is your ramp unique identifier. |
| symbolTypeSent | The symbol of the token/fiat you will send us (COP, MXN, USD, USDC, USDT). |
| symbolTypeReceived | The symbol of the token/fiat we will send you (COP, MXN, USD, USDC, USDT). |
| amountSent | This is the amount you will operate and send to us. |
| bankAccountId | This is the unique identifier the bank account you want to use for your order. |
| userWalletId | This is the unique identifier the wallet you want to use for your order. |
| numberRamp | This is your ramp tracking number. |
| rampType | The type of order/ ramp you will create ("on_ramp": if you have Fiat and want to receive Stable Coin; "off_ramp": if you have Stable Coin and want to receive Fiat). |
| registerDate | This is the date when you created your ramp with us. |
| status | The status of the ramp. It can be: "pending": Awaiting proof of funds transfer., "payapproved": Funds received and approved, "payrejected": The funds transfer does not meet our requirements,  <br />"completed": Transaction successfully completed.  <br />"cancelled": Ramp expired without completion. |
| amountToReceive | This is the amount that we will send and you will receive as a result of your operation. |
| costInfra | This is the infrastructure use cost applied to your transaction in FIAT. This is Kravata's earning for providing the services you are using, and delivering the best experience possible with them. It will be calculated based on the amount sent. |
| rateClient | This is the rate used for calculating the amount to receive and the infrastructure use cost. |
| symbolTypeSent | The symbol of the token/fiat you will send us (COP, MXN, USD, USDC, USDT). |
| symbolTypeReceived | The symbol of the token/fiat we will send you (COP, MXN, USD, USDC, USDT). |
| withdrawalFee | Withdrawal costs related to the transaction. |
| validUntil | This is your ramp's validity period. Format `YYYY-MM-DD HH:MM:SS.ffffff`; the ramp expires 10 minutes after creation. |
| accountDestination | Deposit instructions indicating where you should send the funds. |

> The `clientId` query parameter is required: requests without it are rejected with 401.



## OpenAPI

````yaml /business/openapi.json post /api/ramps
openapi: 3.1.0
info:
  title: Kravata Business API
  version: '1.0'
  description: >-
    Kravata Business API: on-ramp and off-ramp orders between fiat and
    stablecoins for your own accounts and wallets.
servers:
  - url: https://testapi.kravata.co
    description: Test
  - url: https://apiv2.kravata.co
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Accounts
  - name: Wallets
  - name: Ramp Orders
  - name: Webhooks
paths:
  /api/ramps:
    post:
      tags:
        - Ramp Orders
      summary: Create Ramp (Send Based)
      description: >-
        By consuming this endpoint you will be able to create a new ramp for
        converting your assets.


        #### Headers


        | Field | **Type** | Required | Description |

        | --- | --- | --- | --- |

        | Authorization | Header | Yes | The access token, valid for 5 minutes,
        is used to authenticate requests to other endpoints. |

        | clientId | Query | Yes | Include your assigned **ID** in the URL,
        obtainable through the **Get infoClient** endpoint. |

        | idempotency-key | UUID | No | A unique key that prevents duplicate
        execution of the same request in case of retries. |


        #### Request Body


        | **Field** | **Description** |

        | --- | --- |

        | assetIn | The symbol of the asset you will send (COP, MXN, USD, USDC,
        USDT) |

        | assetOut | The symbol of the asset you want to receive (COP, MXN, USD,
        USDC, USDT). |

        | amountIn | The amount of the asset you want to convert. |

        | accountOriginId | The unique ID of your origin Wallet/ Bank Account
        you selected as the origin for the ramp you are creating. You can obtain
        the ID using the **Get /wallets** or **Get /accounts** endpoint. Please
        make sure the account status is approved. |

        | accountDestinationId | The unique ID of your Wallet/Bank Account you
        selected as the destination for the ramp you are creating. You can
        obtain the ID using the **Get /wallets** or **Get /accounts** endpoint.
        Please make sure the account status is approved. |


        #### Response


        The response will include the status of the request and any relevant
        data related to the order created.


        | **Field** | **Description** |

        | --- | --- |

        | Id | This is your ramp unique identifier. |

        | symbolTypeSent | The symbol of the token/fiat you will send us (COP,
        MXN, USD, USDC, USDT). |

        | symbolTypeReceived | The symbol of the token/fiat we will send you
        (COP, MXN, USD, USDC, USDT). |

        | amountSent | This is the amount you will operate and send to us. |

        | bankAccountId | This is the unique identifier the bank account you
        want to use for your order. |

        | userWalletId | This is the unique identifier the wallet you want to
        use for your order. |

        | numberRamp | This is your ramp tracking number. |

        | rampType | The type of order/ ramp you will create ("on_ramp": if you
        have Fiat and want to receive Stable Coin; "off_ramp": if you have
        Stable Coin and want to receive Fiat). |

        | registerDate | This is the date when you created your ramp with us. |

        | status | The status of the ramp. It can be: "pending": Awaiting proof
        of funds transfer., "payapproved": Funds received and approved,
        "payrejected": The funds transfer does not meet our requirements,  <br
        />"completed": Transaction successfully completed.  <br />"cancelled":
        Ramp expired without completion. |

        | amountToReceive | This is the amount that we will send and you will
        receive as a result of your operation. |

        | costInfra | This is the infrastructure use cost applied to your
        transaction in FIAT. This is Kravata's earning for providing the
        services you are using, and delivering the best experience possible with
        them. It will be calculated based on the amount sent. |

        | rateClient | This is the rate used for calculating the amount to
        receive and the infrastructure use cost. |

        | symbolTypeSent | The symbol of the token/fiat you will send us (COP,
        MXN, USD, USDC, USDT). |

        | symbolTypeReceived | The symbol of the token/fiat we will send you
        (COP, MXN, USD, USDC, USDT). |

        | withdrawalFee | Withdrawal costs related to the transaction. |

        | validUntil | This is your ramp's validity period. Format `YYYY-MM-DD
        HH:MM:SS.ffffff`; the ramp expires 10 minutes after creation. |

        | accountDestination | Deposit instructions indicating where you should
        send the funds. |


        > The `clientId` query parameter is required: requests without it are
        rejected with 401.
      operationId: create-ramp-send-based
      parameters:
        - name: clientId
          in: query
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                assetIn:
                  type: string
                assetOut:
                  type: string
                amountIn:
                  type: integer
                accountOriginId:
                  type: string
                accountDestinationId:
                  type: string
            example:
              assetIn: USDC
              assetOut: COP
              amountIn: 50
              accountOriginId: '{{accountOriginId}}'
              accountDestinationId: '{{accountDestinationId}}'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  symbolTypeReceived:
                    type: string
                  symbolTypeSent:
                    type: string
                  amountSent:
                    type: integer
                  amountReceived:
                    type: string
                  bankAccountId:
                    type: string
                  userId:
                    type: string
                  walletId:
                    type: string
                  numberRamp:
                    type: string
                  operationCategory:
                    type: string
                  originUserId:
                    type: string
                  destinationUsertId:
                    type: string
                  rampType:
                    type: string
                  registerDate:
                    type: string
                  status:
                    type: string
                  validUntil:
                    type: string
                  rampMonetary:
                    type: array
                    items:
                      type: object
                      properties:
                        amountToReceive:
                          type: number
                        operationConcept:
                          type: string
                  accountDestination:
                    type: array
                    items:
                      type: array
                      items:
                        type: object
                        properties:
                          concept:
                            type: string
                          description:
                            type: string
                          language:
                            type: string
                          sku:
                            type: string
                          value:
                            type: string
              examples:
                on-ramp:
                  summary: On-ramp
                  value:
                    id: 76cc6491-4637-48f1-bdb5-070a5ff78be5
                    symbolTypeReceived: USDC
                    symbolTypeSent: COP
                    amountSent: 500000
                    amountReceived: '114.51'
                    bankAccountId: e3569aa4-b0f5-4e24-85df-f7708b855db8
                    userId: 08597c65-c25b-4a7c-8c68-f1180bce65f4
                    walletId: d5a3b243-db5b-46c7-b4ce-8e2b88a72122
                    numberRamp: '0005035'
                    operationCategory: ramp
                    originUserId: 08597c65-c25b-4a7c-8c68-f1180bce65f4
                    destinationUsertId: 08597c65-c25b-4a7c-8c68-f1180bce65f4
                    rampType: on_ramp
                    registerDate: '2024-10-28 16:51:22.033548'
                    status: pending
                    validUntil: '2024-10-28 17:01:22.033548'
                    rampMonetary:
                      - amountToReceive: 114.51
                        operationConcept: Amount to receive
                      - operationConcept: Rate Client Concept
                        rateClient: 4349
                      - costInfra: 2000.1051
                        operationConcept: cost Infra
                    accountDestination:
                      - - concept: bank name
                          description: bank name
                          language: EN
                          sku: bankName
                          value: BANCO CAJA SOCIAL
                        - concept: accountType
                          description: accountType
                          language: EN
                          sku: accountType
                          value: corriente
                        - concept: account Number
                          description: account Number
                          language: EN
                          sku: accountNumber
                          value: '860007335'
                        - concept: accountHolderID
                          description: accountHolderID
                          language: EN
                          sku: accountHolderID
                          value: '901595603'
                        - concept: accountHolderName
                          description: accountHolderName
                          language: EN
                          sku: accountHolderName
                          value: KRAVATA SAS
                off-ramp:
                  summary: Off-ramp
                  value:
                    id: b83b065e-5b3c-43e4-ad95-32029f8699ce
                    symbolTypeReceived: COP
                    symbolTypeSent: USDC
                    amountSent: 50
                    amountReceived: '213769.5'
                    bankAccountId: e3569aa4-b0f5-4e24-85df-f7708b855db8
                    userId: 08597c65-c25b-4a7c-8c68-f1180bce65f4
                    walletId: d5a3b243-db5b-46c7-b4ce-8e2b88a72122
                    numberRamp: '0005038'
                    operationCategory: ramp
                    originUserId: 08597c65-c25b-4a7c-8c68-f1180bce65f4
                    destinationUsertId: 08597c65-c25b-4a7c-8c68-f1180bce65f4
                    rampType: off_ramp
                    registerDate: '2024-10-28 17:00:37.055676'
                    status: pending
                    validUntil: '2024-10-28 17:10:37.055676'
                    rampMonetary:
                      - amountToReceive: 213769.5
                        operationConcept: Amount to receive
                      - operationConcept: Rate Client Concept
                        rateClient: 4275.39
                      - costInfra: 0
                        operationConcept: cost Infra
                    accountDestination:
                      - - concept: accountType
                          description: accountType
                          language: EN
                          sku: accountType
                          value: ramp
                        - concept: account Number
                          description: account Number
                          language: EN
                          sku: accountNumber
                          value: '0x23bCDec1fc715b7d7c5EDd69e5B0f517DC82EBAC'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token from POST /api/token (valid 5 minutes).

````