Hi! I’m using Klaviyo API in my app and stuck with the problem: how can I determine the currency of revenue value from API response? Response body doesn’t contain that.
Hi there
Welcome to the Community.
Question, would the currency returned from your API response not be the same as the default in your account’s setting? Can you provide an example of the call and response that is shown / what is expected behavior? I also recommend looking into our developer portal to find solutions there as well.
Thank you,
Alex
Hi
Yes, you right, but app doesn’t know about account settings, it’s just working with the Klaviyo API.
Example: /PLACEDORDERMETRIC/export?measurement=value&by=$attributed_message&api_key=APIKEY - app got revenue data, but It doesn’t know anything about currency.
Can there be any ways to find out the currency through api?
Hello
The currency needs to be set up a separate property in the event and would need to use a string. For Example:
{
“token”: “PUBLIC_KEY”,
“event”: “Ordered Product”,
“customer_properties”: {
“$email”: “test1@klaviyo.com”
},
“properties”: {
“item_name”: “Shoes”,
“$value”: 100',
“currency”: “$”
}
Traditionally, Klaviyo was built to work on a 1:1 level with ecommerce stores. It was built like this as a way to separate/manage data and keep reporting/analytics as concise as possible. Therefore, if you have stores in multiple countries, we always recommend you create a Klaviyo store per instance. With that being said, you are not able to send ISO code but rather the currency symbol instead.
Thanks,
Alex
Log in to the Community
Use your Klaviyo credentials
Log in with Klaviyo
Use your Klaviyo credentials
Log in with KlaviyoEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.