Solved

Get price currency through rest api

pachocastillosr
Tourist
11 1 4

Hi,

I am getting the following product variant object through rest api (/admin/api/2023-07/products.json) but the price currency is not being returned and I need it:

{
product_id: 8547966910779,
id: 45891642589499,
title: S,
price: 75000.00,
sku: ,
position: 1,
inventory_policy: deny,
compare_at_price: null,
fulfillment_service: manual,
inventory_management: shopify,
option1: S,
option2: null,
option3: null,
created_at: 2023-07-24T10:35:14-05:00,
updated_at: 2023-07-24T10:35:14-05:00,
taxable: false,
barcode: ,
grams: 1000,
image_id: 42429068542267,
weight: 1,
weight_unit: kg,
inventory_item_id: 47938406547771,
inventory_quantity: 2,
old_inventory_quantity: 2,
requires_shipping: true,
admin_graphql_api_id: gid://shopify/ProductVariant/45891642589499}

What can I do to get the currency code? The variant has only 1 price.

Accepted Solution (1)
pachocastillosr
Tourist
11 1 4

This is an accepted solution.

Replies 4 (4)

ProgramerAnel
Tourist
10 0 0

You ever found a solution for this ?

pachocastillosr
Tourist
11 1 4

This is an accepted solution.

ProgramerAnel
Tourist
10 0 0

Well, actually this is not mine shop its others shop which data i fetch with domain/products.json ,   if i go with domain/shop.json I have node like this : 

data-currency="GBP" 

 Is it possible to me as a visitor request shop in currency USD ?

pachocastillosr
Tourist
11 1 4
I don't think you can cause you'll need an admin API key for that but maybe
someone else can offer a solution.