openapi: 3.2.0 info: title: Silverflow Currency Conversion Rates API version: 1.417.0 contact: name: API Support email: support@silverflow.com license: name: Commercial description: 'Operations tagged Currency Conversion Rates across 2 of this provider''s published API definitions: silverflow-openapi.yml, silverflow-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://eu-west-1.api.silverflow.com/v1 description: Production URL for Europe - Equivalent to https://api.silverflow.co/v1 - url: https://us-east-2.api.silverflow.com/v1 description: Production URL for North America - url: https://eu-west-1.api-sbx.silverflow.com/v1 description: Sandbox URL - Equivalent to https://api-sbx.silverflow.co/v1 security: - ApiKey: [] - BearerToken: [] tags: - name: Currency Conversion Rates paths: /currencyConversionRate/network/{network}/effectiveDate/{effectiveDate}: get: operationId: getCurrencyRates summary: Get a list of currency conversion rates description: ' Get all currency conversion rates for a specific effective date. Requires `currencyRate:GetInfo` permission. ' tags: - Currency Conversion Rates parameters: - $ref: '#/components/parameters/network' - $ref: '#/components/parameters/effectiveDate' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/openapi_components-parameters-offsetToken' responses: '200': description: A (paged) list of currency rates content: application/json: schema: $ref: '#/components/schemas/CurrencyRatePage' examples: visaExample: $ref: '#/components/examples/response-currency-rates-visa' '400': $ref: '#/components/responses/responses-BadRequestError' '401': $ref: '#/components/responses/responses-UnauthorizedError' '403': $ref: '#/components/responses/responses-ForbiddenError' '429': $ref: '#/components/responses/responses-TooManyRequestsError' servers: - url: https://eu-west-1.api.silverflow.com/v1 description: Production URL for Europe - Equivalent to https://api.silverflow.co/v1 - url: https://us-east-2.api.silverflow.com/v1 description: Production URL for North America - url: https://eu-west-1.api-sbx.silverflow.com/v1 description: Sandbox URL - Equivalent to https://api-sbx.silverflow.co/v1 components: responses: responses-ForbiddenError: description: The authenticated client is forbidden to make the request for the resource identified. content: application/json: schema: $ref: '#/components/schemas/schemas-ProblemDetail' example: type: https://datatracker.ietf.org/doc/html/rfc2616#section-10.4.4 title: Forbidden status: 403 detail: The server is refusing to execute the request for the current authenticated user instance: https://api.silverflow.co/v1/merchants/mct-1hPdFqhgstYTUhlphPDp responses-UnauthorizedError: description: Authentication information is missing or invalid headers: WWW_Authenticate: schema: type: string content: application/json: schema: $ref: '#/components/schemas/schemas-ProblemDetail' example: type: https://datatracker.ietf.org/doc/html/rfc2616#section-10.4.2 title: Unauthorized status: 401 detail: The credentials supplied in the request are either missing, invalid, or not applicable in the current scope responses-TooManyRequestsError: description: The number of requests (per minute) has exceeded the configured maximum content: application/json: schema: $ref: '#/components/schemas/schemas-ProblemDetail' example: type: https://api.silverflow.co/problem/too-many-requests title: Too Many Requests status: 429 detail: The number of requests performed by the client has exceeded the configured maximum for a given period responses-BadRequestError: description: The request was malformed. See the response body for details content: application/json: schema: $ref: '#/components/schemas/schemas-ProblemDetail' example: type: https://datatracker.ietf.org/doc/html/rfc2616#section-10.4.1 title: Bad Request status: 400 detail: The request could not be processed as it contained an invalid request entity instance: https://api.silverflow.co/v1/merchants/mct-1hPdFqhgstYTUhlphPDp validationErrors: - The value of property 'status' should be one of 'idle', 'active' or 'archived' - The value of property 'tags.0.businessId' must not be longer than 255 characters parameters: effectiveDate: name: effectiveDate description: The date for which the currency rates are effective. Ex:2022-10-30. in: path required: true schema: type: string format: date openapi_components-parameters-offsetToken: name: offsetToken description: The offset token. This token is returned in the response of previous request. in: query required: false schema: $ref: '#/components/schemas/openapi_components-schemas-offsetToken' limit: name: limit description: The number of items to return in: query required: false schema: type: integer format: int32 minimum: 1 maximum: 100 default: 10 example: 1 network: name: network description: The card network for which the currency rates are requested. in: path required: true schema: type: string enum: - mastercard - visa examples: response-currency-rates-visa: summary: Example of a Currency Rate Response for a Visa network and effectiveDate value: offsetToken: string items: - id: visa#EUR#USD#2021-10-30 network: visa effectiveDate: '2022-10-30' effectiveFrom: '2022-10-30T11:00:00.000Z' buy: rate: 120000 exponent: 6 sell: rate: 110000 exponent: 6 sourceCurrency: code: EUR exponent: 6 targetCurrency: code: USD exponent: 6 - id: visa#EUR#SEK#2021-10-30 network: visa effectiveDate: '2021-10-30' effectiveFrom: '2021-10-30T11:00:00.000Z' buy: rate: 90000 exponent: 6 sell: rate: 70000 exponent: 6 sourceCurrency: code: EUR exponent: 6 targetCurrency: code: SEK exponent: 6 schemas: MidRate: description: The mid rate. type: object required: - rate - exponent properties: rate: type: integer format: int64 exponent: type: integer format: int64 CurrencyRate: type: object required: - id - network - effectiveDate - effectiveFrom - sell - buy - sourceCurrency - targetCurrency properties: id: description: Unique id for each item type: string network: description: The card network for which the currency rates are requested. $ref: '#/components/schemas/cardNetwork' effectiveDate: description: The date for which the currency rates are effective. type: string effectiveFrom: description: The datetime in utc from which the currency rates are effective. type: string sell: description: The sell rate. $ref: '#/components/schemas/SellRate' buy: description: The buy rate. $ref: '#/components/schemas/BuyRate' mid: description: The mid rate. $ref: '#/components/schemas/MidRate' sourceCurrency: description: The source currency. $ref: '#/components/schemas/CurrencyExponent' targetCurrency: description: The target currency. $ref: '#/components/schemas/CurrencyExponent' schemas-ProblemDetail: type: object description: 'The ''problem detail'' object relays detailed information about the error that occurred. It is defined by [RFC 7807 - Problem Details for HTTP APIs](https://tools.ietf.org/html/rfc7807). Note that additional properties may be used to relay error specific information. For instance, A Bad Request error may hold information about the individual validation errors found in the request. ' properties: type: type: string description: 'An absolute URI that identifies the problem type. ' default: about:blank example: https://api.silverflow.co/problem/constraint-violation title: type: string description: 'A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); ' example: Service Unavailable status: type: integer format: int32 description: 'The HTTP status code generated by the origin server for this occurrence of the problem. ' minimum: 100 maximum: 599 example: 503 detail: type: string description: 'A human readable explanation specific to this occurrence of the problem. ' example: Connection to database timed out instance: type: string description: 'An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. ' additionalProperties: true example: type: https://api.silverflow.co/problem/bad-request title: Bad Request status: 400 detail: The request could not be processed as it contained an invalid request entity instance: https://api.silverflow.co/v1/merchants/mct-1hPdFqhgstYTUhlphPDp validationErrors: - The value of property 'status' should be one of 'idle', 'active' or 'archived' - The value of property 'tags.0.businessId' must not be longer than 255 characters cardNetwork: type: string description: The card network enum: - mastercard - visa example: mastercard CurrencyRatePage: allOf: - $ref: '#/components/schemas/components-schemas-Page' - type: object properties: items: type: array items: $ref: '#/components/schemas/CurrencyRate' BuyRate: description: The buy rate. type: object required: - rate - exponent properties: rate: type: integer format: int64 exponent: type: integer format: int64 components-schemas-Page: type: object properties: offsetToken: $ref: '#/components/schemas/openapi_components-schemas-offsetToken' CurrencyExponent: description: The source or target currency. type: object required: - code - exponent properties: code: type: string exponent: type: integer format: int64 openapi_components-schemas-offsetToken: type: string pattern: ^[a-zA-Z0-9%]+$ SellRate: description: The sell rate. type: object required: - rate - exponent properties: rate: type: integer format: int64 exponent: type: integer format: int64 securitySchemes: ApiKey: description: "The primary method of authenticating to the Silverflow API is through API keys.\n\nAPI keys can be created by calling the [createApiKey](#operation/createApiKey) endpoint. You can create up to 40 API keys and also update and delete them, allowing for _credential rotation_.\n\nThe _Agent Activation_ process will generate an initial API Key for you. See [Activate Agent](#section/Getting-Started).\n\nA call to the [createApiKey](#operation/createApiKey) endpoint will return the following structure:\n\n```json\n{\n \"key\": \"apk-1wtRxni5IsPsSpBLWpwr\",\n \"status\": \"active\",\n \"agentKey\": \"cgt-1wtRvFLIjDOyyUR5Q2LB\",\n \"description\": \"Data lake API key\",\n \"permissions\": [\n \"charges:List\",\n \"reports:All\"\n ],\n \"created\": \"2021-06-22T11:21:45.115Z\",\n \"secret\": \"FWtnOOHAjbD6rNxWWEeVOCj7JXSEPGJQ\",\n \"version\": 1\n}\n```\n\n> **Important:** The `secret` is only returned once in the response to the `createApiKey` call.\n\nOnce created, the `key` and `secret` fields from the API key must be used in the HTTP `Authorization` header using the `Basic` scheme.\nThe Basic scheme requires a **username** and **password** to be specified, separated by a `:` (colon) and Base64 encoded.\n\nUse the following values from the API key to construct a Basic authentication header:\n\n| Basic field | API key field | Example |\n| ----------- | ------------- | ------- |\n| username | `key` | `apk-1wtRxni5IsPsSpBLWpwr` |\n| password | `secret` | `FWtnOOHAjbD6rNxWWEeVOCj7JXSEPGJQ` |\n\nIn pseudo-code a valid HTTP Basic Authentication header would be constructed as follows:\n\n```ts\nconst apiKeyId = \"apk-1wtRxni5IsPsSpBLWpwr\";\nconst apiKeySecret = \"FWtnOOHAjbD6rNxWWEeVOCj7JXSEPGJQ\";\nconst authnValue = \"Basic \" + base64Encode(apiKeyId + \":\" + apiKeySecret);\nrequest.setHeader(\"Authorization\", authnValue);\n```\n\nUsing the values from the example a valid HTTP request would look like the following:\n\n```http\nGET /v1/agents/current HTTP/1.1\nAccept: application/json\nAuthorization: Basic YXBrLTF3dFJ4bmk1SXNQc1NwQkxXcHdyOkZXdG5PT0hBamJENnJOeFdXRWVWT0NqN0pYU0VQR0pR\n```\n\nMore information on the Basic scheme can be found in [RFC-7617 - The 'Basic' HTTP Authentication Scheme](https://datatracker.ietf.org/doc/html/rfc7617)." type: http scheme: basic BearerToken: description: 'Bearer tokens are temporary security credentials that can be used to authorize ''third parties'' (bearers) access to the Silverflow API on behalf of the agent. These tokens are created by calling the [createAgentBearerToken](#operation/createAgentBearerToken) endpoint. Once created the `token` field must be used in the HTTP `Authorization` header using the `Bearer` scheme. Here''s an example of an HTTP request with a bearer token: ```http GET /v1/merchants/mct-1hPdFhmgaBzMS191nIbJ HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...40EFOgxf_3I6mPZ16bXqHd5tUyApgl0mNOAXPm5AhnA ``` More information on the Bearer scheme can be found in [RFC-6750 - The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://datatracker.ietf.org/doc/html/rfc6750).' type: http scheme: bearer bearerFormat: JWT MutualTLS: type: apiKey in: header name: '-' description: 'The client must set up mTLS connection with a valid X.509 client certificate signed by a customer-provided CA (certificate authority) that is registered to a specific agent. The customer-provided CA certificate must be shared and added to Silverflow''s trust store prior to calling endpoints. Certificate validation happens at the transport layer during TLS handshake. Tenant verification is performed by matching the agent key embedded in the client certificate against the agent key embedded in the trusted CA. ' x-refined-from: - silverflow-openapi.yml - silverflow-openapi.yml x-tagGroups: - name: '' tags: - Introduction - Release Notes - name: Accounts tags: - Agents - API Keys - Bins - Merchants - Merchant Acceptors - Enrollments - Screenings - name: Event Notifications tags: - Event Subscriptions - Charges Events - Disputes Events - Fraud Notification Events - Processor Tokens Events - Network Tokens Events - Report Events - Distribution Events - AMMF Submission Events - Reconciliation Events - Clearing Events - name: 3DS Authentication tags: - 3DS Authentication - name: BEP Authentication tags: - BEP Authentication - name: Tokenization tags: - Processor Tokenization - Network Tokenization - name: Charges tags: - Create Charges - Create Recurring - Retrieve Charges - Charge Actions - name: Terminal-To-Cloud tags: - Create POS Charges - Retrieve POS Charges - POS Charge Actions - name: Card Management tags: - Card Management - name: Disputes tags: - Disputes - Documents - name: Fraud Notifications tags: - Fraud Notifications - name: Card Info tags: - Card Info - name: Currency Conversion Rates tags: - Currency Conversion Rates - name: Fees tags: - Fees - name: Reconciliation tags: - Reconciliation Details - Network Funds Transfers - name: Reports tags: - Reconciliation Reports - Settlement Reports - Card Network Reports - Dispute Reports - Fraud Notifications Reports - Charges Reports - Scheme Fee Reports - Retrieve Reports - Report Scheduling - Distributions - name: Transaction Risk Assessment tags: - Transaction Risk Assessment - name: File Subscriptions tags: - File Subscriptions