Skip to main content
POST
/
v2
/
integrations
/
currency-exchanges
curl --location 'https://integrations.projectcor.com/v2/integrations/currency-exchanges' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "currency_exchanges": [
    {
      "foreign_currency": "USD",
      "base_currency": "ARS",
      "amount": 100,
      "factor": 1,
      "effective_date": "2025-03-20T02:00:00Z",
      "metadata": {
        "last_updated_datetime": "2025-03-20T02:00:00Z",
        "rate_type": "EURX"
      }
    },
    {
      "foreign_currency": "EUR",
      "base_currency": "ARS",
      "amount": 110.50,
      "factor": 1,
      "effective_date": "2025-03-20T02:00:00Z",
      "metadata": {
        "last_updated_datetime": "2025-03-20T02:00:00Z",
        "rate_type": "EURX"
      }
    }
  ],
  "metadata": {
    "source": "GLOBANT"
  }
}'
{
  "status": "success",
  "company_id": 2336,
  "records_received": 2,
  "records_deduplicated": 1,
  "records_created": 1,
  "records_replaced": 0,
  "records_rejected": 0,
  "errors": []
}
Creates currency exchange rates in your COR instance through the integrations service. This endpoint processes multiple exchange rates in a single request and provides detailed feedback about successes, duplicates, and errors.
Batch Processing: You can submit up to 20 currency exchange records per request. The endpoint will process all records and return detailed statistics about the operation.

Request Body Requirements

metadata
object
required
currency_exchanges
array
required
Array of currency exchange rates (maximum 20 items)

Response

The endpoint returns statistics about the batch operation:
  • status — Operation status: success (all records processed), failed (all records rejected), or partial (some succeeded, some failed)
  • company_id — The unique identifier of the company associated with the request
  • records_received — Total number of records in the request
  • records_deduplicated — Number of duplicate records removed
  • records_created — Number of successfully created records
  • records_replaced — Number of records that replaced existing ones
  • records_rejected — Number of records that failed validation or processing
  • errors — Array of error details for rejected records
Each item in errors includes:
FieldTypeDescription
from_currencystringSource/foreign currency ISO code of the rejected record
to_currencystringBase/target currency ISO code of the rejected record
messagestringValidation or business-rule message explaining why the record was rejected

Known Errors

Validation Errors

  • ValidationError — Missing required fields or invalid structure
  • Currency not found — The specified ISO code doesn’t exist in the system
  • Base currency mismatch — The base_currency doesn’t match your company’s base currency

Business Logic Errors

  • Date mismatch — effective_date and last_updated_datetime must be on the same day (for GLOBANT source)
  • Invalid exchange rate — Amount or factor values are invalid
curl --location 'https://integrations.projectcor.com/v2/integrations/currency-exchanges' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "currency_exchanges": [
    {
      "foreign_currency": "USD",
      "base_currency": "ARS",
      "amount": 100,
      "factor": 1,
      "effective_date": "2025-03-20T02:00:00Z",
      "metadata": {
        "last_updated_datetime": "2025-03-20T02:00:00Z",
        "rate_type": "EURX"
      }
    },
    {
      "foreign_currency": "EUR",
      "base_currency": "ARS",
      "amount": 110.50,
      "factor": 1,
      "effective_date": "2025-03-20T02:00:00Z",
      "metadata": {
        "last_updated_datetime": "2025-03-20T02:00:00Z",
        "rate_type": "EURX"
      }
    }
  ],
  "metadata": {
    "source": "GLOBANT"
  }
}'
{
  "status": "success",
  "company_id": 2336,
  "records_received": 2,
  "records_deduplicated": 1,
  "records_created": 1,
  "records_replaced": 0,
  "records_rejected": 0,
  "errors": []
}