cURL
curl --request PUT \
--url https://us.api.flexprice.io/v1/forex/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_date": "2023-11-07T05:31:56Z",
"metadata": {},
"rate": "<string>",
"start_date": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.fx_rates.update_fx_rate(id="<id>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.fxRates.updateFXRate("<id>", {});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.FXRates.UpdateFXRate(ctx, "<id>", types.UpdateFXRateRequest{})
if err != nil {
log.Fatal(err)
}
if res.FXRateResponse != nil {
// handle response
}
}{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"environment_id": "<string>",
"from_currency": "<string>",
"id": "<string>",
"metadata": {},
"rate": "<string>",
"scope": "tenant",
"scope_id": "<string>",
"source": "fixed",
"start_date": "2023-11-07T05:31:56Z",
"status": "published",
"tenant_id": "<string>",
"to_currency": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}FX Rates
Update an FX rate
Update a rate’s value, validity window (overrides only) or metadata. Scope, scope_id and the currency pair are immutable.
PUT
/
forex
/
{id}
cURL
curl --request PUT \
--url https://us.api.flexprice.io/v1/forex/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_date": "2023-11-07T05:31:56Z",
"metadata": {},
"rate": "<string>",
"start_date": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.fx_rates.update_fx_rate(id="<id>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.fxRates.updateFXRate("<id>", {});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.FXRates.UpdateFXRate(ctx, "<id>", types.UpdateFXRateRequest{})
if err != nil {
log.Fatal(err)
}
if res.FXRateResponse != nil {
// handle response
}
}{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"environment_id": "<string>",
"from_currency": "<string>",
"id": "<string>",
"metadata": {},
"rate": "<string>",
"scope": "tenant",
"scope_id": "<string>",
"source": "fixed",
"start_date": "2023-11-07T05:31:56Z",
"status": "published",
"tenant_id": "<string>",
"to_currency": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Path Parameters
FX rate ID
Body
application/json
FX rate fields to update
Response
OK
Show child attributes
Show child attributes
Available options:
tenant, customer, subscription Available options:
fixed, market Available options:
published, deleted, archived 
