CurrencyRate

CurrencyRate allows users to manage different currency exchange rates when Multi-Currency is enabled in Maximizer CRM.

A CurrencyRate entry contains three main elements, CurrencyCode, Rate and EffectiveDate. See below some considerations for those elements:

  • CurrencyCode: code of the currency the rate will apply to. To see full list of currency codes check FieldOptions.\

  • Rate: represents the exchange rate between the input currency and the corporate currency. This field specifies how much of the input currency is equivalent to one unit of the corporate currency. For example, if the corporate currency is USD and the input currency is EUR, a rate of 0.85 would mean that 1 USD is equal to 0.85 EUR.\

  • EffectiveDate: date and time when the rate becomes applicable.

Metadata

Read CurrencyRate Metadata (simple)

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Schema": {
        "Scope": {
            "Fields": 1
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$TREE": "/CurrencyRate"
                }
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read CurrencyRate Metadata (more)

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Schema": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Alias": 1,
                "Type": 1,
                "Name": 1,
                "AppliesTo": 1,
                "Sortable": 1,
                "Queryable": 1,
                "Mandatory": 1,
                "Attributes": 1,
                "HasOption": 1,
                "DisplayValue": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$TREE": "/CurrencyRate"
                }
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Field Options

Read CurrencyRate FieldOptions - CurrencyCode

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "CurrencyRate": {
        "FieldOptions": {
            "CurrencyCode": [
                {
                    "Code": 1,
                    "DisplayValue": 1
                }
            ]
        }
    }
}

CurrencyRate CRUD

Create - CurrencyRate

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "CurrencyRate": {
        "Data": {
            "Key": null, // Will be generated automatically
            "CurrencyCode": "USD", // Mandatory - Needs to be valid currency code, see field options
            "Description": "United States Dollar", // Can be any string but its recommended to use currency name
            "Rate": 5.0, // Exchange rate between CurrencyCode and Corporate Currency Code. Specifies how much of the input currency is equivalent to one unit of the corporate currency
            "EffectiveDate": "2018-07-13T00:00:00Z"
        }
    }
}

Read - CurrencyRate

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "CurrencyRate": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Description": 1,
                "CurrencyCode": { // Currency this rate applies to 
                    "Code": 1,
                    "DisplayValue": 1
                },
                "Rate": 1, // Exchange rate between CurrencyCode and Corporate Currency Code. Specifies how much of the input currency is equivalent to one unit of the corporate currency
                "EffectiveDate": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "CurrencyCode": {
                    "$EQ": "AUD"
                }
            },
            "Top": 3
        }
    }
}

Update - CurrencyRate

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    "CurrencyRate": {
        "Data": {
            "Key": "Q3VycmVuY3lSYXRlCTY=", // Mandatory
            "CurrencyCode": "EUR", // Needs to be valid currency code, see field options
            "Description": "Euro", // Can be any string but its recommended to use currency name
            "Rate": 4.0, // Exchange rate between CurrencyCode and Corporate Currency Code. Specifies how much of the input currency is equivalent to one unit of the corporate currency
            "EffectiveDate": "2024-08-15T00:00:00Z"
        }
    }
}

Delete - CurrencyRate

// POST https://api.maximizer.com/octopus/Delete
// Authorization: Bearer <token>
{
    "CurrencyRate": {
        "Data": {
            "Key": "Q3VycmVuY3lSYXRlCTE=" // Mandatory
        }
    }
}