Skip to content

HubSpot: Create multiple exchange rates

HubSpot currencies.batchCreateExchangeRates: arguments, response, policy and SDK examples.

← Currencies operations · Get started

Operation hubspot.currencies_batch_create_exchange_rates

Provider route: POST /settings/currencies/2026-09/exchange-rates/batch/create. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["currencies"]["batchCreateExchangeRates"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.currencies.batchCreateExchangeRates(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.currencies.batch_create_exchange_rates(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyModelRequired within parentExpand Create multiple exchange rates — request body — body

Referenced models: Create multiple exchange rates — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Exchange Rate
$ (anyOf 2)ModelAlternativeExpand Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Exchange Rate With Errors

Referenced models: Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Exchange Rate, Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Exchange Rate With Errors

Create multiple exchange rates — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
inputsarrayRequired within parentAn array of ExchangeRateCreateRequest objects, each representing the details required to create a single exchange rate. This includes properties like fromCurrencyCode, conversionRate, and effectiveAt.
inputs[]ModelEach itemExpand Add a new exchange rate — request body — body

Referenced models: Add a new exchange rate — request body — body

Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Exchange Rate
FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe datetime the response was completed
Format: date-time
linksobjectOptionalThe link to the next page with exchange rates.
Additional keys: see wildcard field
links.*stringAdditional keys
requestedAtstringOptionalThe datetime the of the request.
Format: date-time
resultsarrayRequired within parentAn array of exchange rate objects that represent the results of the batch operation.
results[]ModelEach itemExpand Add a new exchange rate — response body
startedAtstringRequired within parentThe datetime the of the request.
Format: date-time
statusstringRequired within parentThe current status of the response (e.g. COMPLETED)
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Add a new exchange rate — response body

Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Exchange Rate With Errors
FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe datetime the response was completed
Format: date-time
errorsarrayOptionalAn array of standard error objects detailing any errors encountered during the batch operation.
errors[]ModelEach itemExpand Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING errors item
linksobjectOptionalThe link to the next page with exchange rates.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors associated to the request.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe datetime the of the request.
Format: date-time
resultsarrayRequired within parentAn array of exchange rate objects representing the successful results of the batch operation.
results[]ModelEach itemExpand Add a new exchange rate — response body
startedAtstringRequired within parentThe datetime the of the request.
Format: date-time
statusstringRequired within parentThe current status of the response (e.g. COMPLETED)
Known values: CANCELED, COMPLETE, PENDING, PROCESSING

Referenced models: Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING errors item, Add a new exchange rate — response body

Add a new exchange rate — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
conversionRatenumberRequired within parentThe conversion rate between the to and from currency code of this exchange rate.
effectiveAtstringOptionalThe date the exchange rate is in effect.
Format: date-time
fromCurrencyCodestringRequired within parentThis represents the three-letter currency code (such as USD for US Dollar) of the currency you want to convert from.
One of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XUA, YER, ZAR, ZMW, ZWL
Add a new exchange rate — response body
FieldTypePresenceDescription and constraints
$objectRoot
conversionRateJSONRequired within parent
conversionRate (anyOf 1)numberAlternativeThe conversion rate between the to and from currency code of this exchange rate.
conversionRate (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
createdAtstringRequired within parentThe date the exchange rate was created.
Format: date-time
effectiveAtstringRequired within parentThe date the exchange rate is in effect.
Format: date-time
fromCurrencyCodestringRequired within parentThis represents the three-letter currency code (such as USD for US Dollar) of the currency you are converting from.
Known values: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XUA, YER, ZAR, ZMW, ZWL
idstringRequired within parentA unique identifier for the exchange rate
toCurrencyCodestringRequired within parentThis represents the three-letter currency code (such as USD for US Dollar) of the currency you are converting to.
Known values: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XUA, YER, ZAR, ZMW, ZWL
updatedAtstringRequired within parentThe date the exchange rate was last updated.
Format: date-time
visibleInUIbooleanRequired within parentThis indicates if the exchange rate is shown in the MultiCurrency settings page.
Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING errors item
FieldTypePresenceDescription and constraints
$objectRootYe olde error
categorystringRequired within parentThe main category of the error.
contextobjectRequired within parentAdditional context-specific information related to the error.
Additional keys: see wildcard field
context.*arrayAdditional keys
context.*[]stringEach item
errorsarrayRequired within parentThe detailed error objects.
errors[]ModelEach itemExpand Batch insert events — response body — errors item errors item
idstringOptionalA unique ID for the error instance.
linksobjectRequired within parentURLs linking to documentation or resources associated with the error.
Additional keys: see wildcard field
links.*stringAdditional keys
messagestringRequired within parentA human-readable string describing the error and possible remediation steps.
statusstringRequired within parentThe HTTP status code associated with the error.
subCategoryobjectOptionalA more specific error category within each main category.

Referenced models: Batch insert events — response body — errors item errors item

Batch insert events — response body — errors item errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents detailed information about an error that occurred in the API. This component is used to provide additional context and specifics about errors, typically as part of an error response.
codestringOptionalThe status code associated with the error detail
contextobjectOptionalContext about the error condition
Additional keys: see wildcard field
context.*arrayAdditional keys
context.*[]stringEach item
instringOptionalThe name of the field or parameter in which the error was found.
messagestringRequired within parentA human readable message describing the error along with remediation steps where appropriate
subCategorystringOptionalA specific category that contains more specific detail about the error

SDK function policy ID: hubspot.currencies_batch_create_exchange_rates. Catalog operation: currencies_batch_create_exchange_rates. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["settings.currencies.write"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.