We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to obtain tax number information in orders from Mexico

Solved

How to obtain tax number information in orders from Mexico

363518457
Shopify Partner
23 0 5

{"query":"query { order(id: "gid://shopify/Order/*****") { name localizationExtensions(first: 100) { edges { node { key countryCode purpose title value } } }}}"}

 

We obtain the tax ID information of the order through the above interface. But I found a problem. Brazilian tax numbers can be obtained successfully, but Mexican tax numbers cannot be obtained. May I ask how to solve this problem.

 

 

Successfully retrieved data from data1, but when retrieving data from data2, the returned data was empty.

 

data1: CPF/CNPJ:00755720873

data2: RFC:BORO630127DU8

Accepted Solution (1)
Foxfur
Shopify Partner
9 1 2

This is an accepted solution.

Ok I managed to fix the bad request issue I had and indeed if you query 

 

 

localizedFields(first: 100) {
    nodes {
          title
          value
     }
}

 

on the order object, you will indeed get the RFC number on Mexican orders, but you need to switch to the 2025-01 version of the API, since it's a change that has only just been introduced at the beginning of this year.

Hope it works for you!
 

 

Foxfur_3-1736363036678.png

View solution in original post

Replies 3 (3)

Foxfur
Shopify Partner
9 1 2

I was just looking for the same number but as you say the endpoint you mention doesn't include the RFC number on Mexican orders.

I noticed on the 2025-01 version of the GraphQL API there's a connection on the object order that's called localizedFields which supposedly should contain the same data, however when I try to query that version of the API it just returns 'bad request', regardless of what I query it with, so I haven't yet been able to see if that localizedFields connection contains the RFC number for Mexico. 

 

If anyone knows where else I can find this number in the GraphQL API, I'd love to know, thank you!

Foxfur
Shopify Partner
9 1 2

This is an accepted solution.

Ok I managed to fix the bad request issue I had and indeed if you query 

 

 

localizedFields(first: 100) {
    nodes {
          title
          value
     }
}

 

on the order object, you will indeed get the RFC number on Mexican orders, but you need to switch to the 2025-01 version of the API, since it's a change that has only just been introduced at the beginning of this year.

Hope it works for you!
 

 

Foxfur_3-1736363036678.png
nelsonestrada5
Shopify Partner
8 0 2

This worked for me, thank you @Foxfur!