# Services

## Exchange rates

> This API method allows you to retrieve the exchange rates for different currencies based on a specific amount and your own currency. By providing the amount and the currency code, you can access the current exchange rates against various other currencies. The response will include the exchange rates for the specified amount in comparison to each currency, allowing you to see currency conversions.\</br>\
> \
> 🔹\*\*Description of control elements:\*\*\
> \
> \*\*SCHEMA\*\*\</br>\
> Displays the full technical structure of the request or response, including field names, data types, required fields, allowed values, and validation rules.\
> \- \*\*Single line description\*\*\</br>\
> &#x20; A description that fits into a single line; any text that does not fit remains hidden.\
> \- \*\*Multiline description\*\*\</br>\
> &#x20; An expanded description that displays more than one line of text.\
> \
> \*\*EXAMPLE\*\*\</br>\
> Shows a ready-made sample JSON with correctly formatted values to demonstrate how a valid request or response should look.<br>

```json
{"openapi":"3.0.0","info":{"version":"1.0.0"},"tags":[],"servers":[{"description":"sandbox","url":"https://api-stage.novapost.pl/v.1.0/"},{"description":"production","url":"https://api.novapost.com/v.1.0/"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"Authorization","description":"Authorization JWT-token with a lifetime of 1 hour in header"}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Validation":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Time-out":{"description":"Connection time-out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"errors":{"type":"object","properties":{"":{"type":"string"}}}}}}},"paths":{"/exchange-rates/conversion":{"post":{"tags":["Services"],"description":"This API method allows you to retrieve the exchange rates for different currencies based on a specific amount and your own currency. By providing the amount and the currency code, you can access the current exchange rates against various other currencies. The response will include the exchange rates for the specified amount in comparison to each currency, allowing you to see currency conversions.</br>\n\n🔹**Description of control elements:**\n\n**SCHEMA**</br>\nDisplays the full technical structure of the request or response, including field names, data types, required fields, allowed values, and validation rules.\n- **Single line description**</br>\n  A description that fits into a single line; any text that does not fit remains hidden.\n- **Multiline description**</br>\n  An expanded description that displays more than one line of text.\n\n**EXAMPLE**</br>\nShows a ready-made sample JSON with correctly formatted values to demonstrate how a valid request or response should look.\n","requestBody":{"description":"Optional description in *Markdown*","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","format":"float","description":"Amount of money to get sum in exchange rate for specified currency. Must include 2 decimal places."},"countryCode":{"type":"string","description":"Sender`s country code, according to the ISO 3166-1 Alpha-2 standard.","pattern":"^[A-Z]{2}$"},"currencyCode":{"type":"string","description":"Currency code to get exchange rate, according to the iso-4217 standard.","pattern":"^[A-Z]{3}$"},"date":{"type":"string","format":"date-time","description":"Operation date for exchange rate in ISO 8601 format."}}}}}},"responses":{"200":{"description":"shipments","content":{"application/json":{"schema":{"type":"object","properties":{"requestCurrency":{"type":"object","description":"Initial amount of money and currency for exchange.","properties":{"currencyCode":{"type":"string","description":"Currency code being exchanged, compliant with the ISO-4217 standard.","pattern":"^[A-Z]{3}$"},"amount":{"type":"number","format":"float","description":"Amount of money being exchanged. Must include 2 decimal places."}}},"mainCurrency":{"type":"object","description":"Calculation of the exchange amount in the currency of the country which countryCode was specified.","properties":{"currencyCode":{"type":"string","description":"Currency of the country which countryCode was specified, according to the iso-4217 standard.","pattern":"^[A-Z]{3}$"},"amount":{"type":"number","format":"float","description":"Amount of money in exchange rate of currency for specified country. Must include 2 decimal places."}}},"convertedCurrencies":{"type":"array","description":"List of the calculations for available current exchange rates against various other currencies based on a specified amount of money in request.","items":{"type":"object","properties":{"currencyCode":{"type":"string","description":"Currency code, according to the iso-4217 standard.","pattern":"^[A-Z]{3}$"},"amount":{"type":"number","format":"float","description":"Amount of money counted in currency`s exchange rate. Must include 2 decimal places."}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Validation"},"503":{"$ref":"#/components/responses/Time-out"}},"summary":"Exchange rates"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-portal.novapost.com/metodi-1/methods/services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
