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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Create multiple exchange rates — request body — body |
Referenced models: Create multiple exchange rates — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Batch Response Exchange Rate |
$ (anyOf 2) | Model | Alternative | Expand 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
Schemas
Section titled “Schemas”Create multiple exchange rates — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
inputs | array | Required within parent | An array of ExchangeRateCreateRequest objects, each representing the details required to create a single exchange rate. This includes properties like fromCurrencyCode, conversionRate, and effectiveAt. |
inputs[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The datetime the response was completed Format: date-time |
links | object | Optional | The link to the next page with exchange rates. Additional keys: see wildcard field |
links.* | string | Additional keys | |
requestedAt | string | Optional | The datetime the of the request. Format: date-time |
results | array | Required within parent | An array of exchange rate objects that represent the results of the batch operation. |
results[] | Model | Each item | Expand Add a new exchange rate — response body |
startedAt | string | Required within parent | The datetime the of the request. Format: date-time |
status | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The datetime the response was completed Format: date-time |
errors | array | Optional | An array of standard error objects detailing any errors encountered during the batch operation. |
errors[] | Model | Each item | Expand Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING errors item |
links | object | Optional | The link to the next page with exchange rates. Additional keys: see wildcard field |
links.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors associated to the request. Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | The datetime the of the request. Format: date-time |
results | array | Required within parent | An array of exchange rate objects representing the successful results of the batch operation. |
results[] | Model | Each item | Expand Add a new exchange rate — response body |
startedAt | string | Required within parent | The datetime the of the request. Format: date-time |
status | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
conversionRate | number | Required within parent | The conversion rate between the to and from currency code of this exchange rate. |
effectiveAt | string | Optional | The date the exchange rate is in effect. Format: date-time |
fromCurrencyCode | string | Required within parent | This 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
conversionRate | JSON | Required within parent | |
conversionRate (anyOf 1) | number | Alternative | The conversion rate between the to and from currency code of this exchange rate. |
conversionRate (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
createdAt | string | Required within parent | The date the exchange rate was created. Format: date-time |
effectiveAt | string | Required within parent | The date the exchange rate is in effect. Format: date-time |
fromCurrencyCode | string | Required within parent | This 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 |
id | string | Required within parent | A unique identifier for the exchange rate |
toCurrencyCode | string | Required within parent | This 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 |
updatedAt | string | Required within parent | The date the exchange rate was last updated. Format: date-time |
visibleInUI | boolean | Required within parent | This indicates if the exchange rate is shown in the MultiCurrency settings page. |
Retrieve multiple rates — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Ye olde error |
category | string | Required within parent | The main category of the error. |
context | object | Required within parent | Additional context-specific information related to the error. Additional keys: see wildcard field |
context.* | array | Additional keys | |
context.*[] | string | Each item | |
errors | array | Required within parent | The detailed error objects. |
errors[] | Model | Each item | Expand Batch insert events — response body — errors item errors item |
id | string | Optional | A unique ID for the error instance. |
links | object | Required within parent | URLs linking to documentation or resources associated with the error. Additional keys: see wildcard field |
links.* | string | Additional keys | |
message | string | Required within parent | A human-readable string describing the error and possible remediation steps. |
status | string | Required within parent | The HTTP status code associated with the error. |
subCategory | object | Optional | A 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents 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. |
code | string | Optional | The status code associated with the error detail |
context | object | Optional | Context about the error condition Additional keys: see wildcard field |
context.* | array | Additional keys | |
context.*[] | string | Each item | |
in | string | Optional | The name of the field or parameter in which the error was found. |
message | string | Required within parent | A human readable message describing the error along with remediation steps where appropriate |
subCategory | string | Optional | A specific category that contains more specific detail about the error |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"]