Request Quote

Endpoint

POST {{baseUrl}}/exchange-rate

Description

This endpoint retrieves the exchange rate between two specified currencies. The request must include the source and target currencies, method ID, and method type (either "payin" or "payout"). The request requires bearer token authentication.

Request

Headers

  • Authorization: Bearer YOUR_ACCESS_TOKEN

  • Content-Type: application/json

Request Body

{
    "from_currency" : "USD",
    "to_currency": "GBP",
    "method_id": 331,
    "method_type": "payin"
}

Exchange rate

post
Authorizations
Query parameters
debugbooleanRequiredExample: true
Body
all ofOptional
and
anyOptionalExample: {"from_currency":"CLP","to_currency":"CLP","method_id":508,"method_type":"payout","amount":2000}
Responses
200
OK
application/json
Responseall of
and
anyOptionalExample: {"status":"success","status_code":200,"message":"Request successful","data":{"payout":{"id":"19","country":"CHL","amount":200,"currency":"CLP","orderId":"7GPKFXKG","description":"Payout requesst"},"output":{"stage":"IN_PROGRESS","status":"CREATED","statusChangeDateTime":"2024-03-02T10:22:19.228586"}}}
post
POST /api/v1/exchange-rate HTTP/1.1
Host: smtp.yativo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 96

{
  "from_currency": "CLP",
  "to_currency": "CLP",
  "method_id": 508,
  "method_type": "payout",
  "amount": 2000
}
200

OK

{
  "status": "success",
  "status_code": 200,
  "message": "Request successful",
  "data": {
    "payout": {
      "id": "19",
      "country": "CHL",
      "amount": 200,
      "currency": "CLP",
      "orderId": "7GPKFXKG",
      "description": "Payout requesst"
    },
    "output": {
      "stage": "IN_PROGRESS",
      "status": "CREATED",
      "statusChangeDateTime": "2024-03-02T10:22:19.228586"
    }
  }
}
import requests
import json

url = "{{baseUrl}}/exchange-rate"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "from_currency": "USD",
    "to_currency": "GBP",
    "method_id": 331,
    "method_type": "payin"
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())

Response

Example Success Response

{
  "status": "success",
  "status_code": 200,
  "message": "Exchange rate retrieved successfully",
  "data": {
    "from_currency": "USD",
    "to_currency": "GBP",
    "exchange_rate": 0.75,
    "method_id": 331,
    "method_type": "payin",
    "timestamp": "2024-07-03T12:00:00Z"
  }
}

Last updated