Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi. I'm trying to get the "CPF/CNPJ" field from API Shopify, but I cannot do it. This field stores the "Document ID" in Brazil. When I get a order using Orders Endpoint, this field doesn't return. How can I get this information?
Same problem here. Any updates?
I also have this issue, same for South Korea. Any suggestions?
+1 ..
same problem here...
In case anyone is still looking for this, you need to fetch the order information from the GraphQL API, and the tax id for Brazil or South Korea is within the
You would get something like this for Brazil CPF/CNPJ:
"localizationExtensions": {
"nodes": [
{
"countryCode": "BR",
"purpose": "SHIPPING",
"title": "CPF/CNPJ",
"value": "000.000.000-00"
}
]
},
And for the South Korean PCC:
"localizationExtensions": {
"nodes": [
{
"countryCode": "KR",
"purpose": "SHIPPING",
"title": "Personal Customs Code",
"value": "P000000000000"
}
]
},
what GraphQL query? can I use the payment app graphql for this ?
Not sure about the Payments app API, cause I haven't used that API, but the LocalizationExtension object is part of the order information which is available in the Admin apps API.
For those who need to search for the CPF/CNPJ via GraphQL, this is the query:
query { order(id: ""gid://shopify/Order/00000000000"" ) { name,
localizationExtensions(first:10){ nodes { purpose, countryCode, title, value } } } }
If you're using the C# lib for Shopify GraphQL:
var result = ShopifyGraphQL.Net.Factories.GraphServiceFactory
.CreateGraphService("https://storename.myshopify.com/admin/api/2024-07/graphql.json", Token)
.PostAsync(@"query { order(id: ""gid://shopify/Order/000000000000"" ) { name,
localizationExtensions(first:10){ nodes { purpose, countryCode, title, value } } } }")
.Result;
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025