Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Get Italian Codice Fiscale and PEC field values through API

Solved

Get Italian Codice Fiscale and PEC field values through API

Antonio84
Shopify Partner
50 1 3

Hello Where I can get that informations from the shopify rest Order API ?

Take a look at the image below:

110621332-5ec75300-819a-11eb-83ee-15caab3557b9.png

Accepted Solution (1)
ShopifyDevSup
Shopify Staff
1453 238 518

This is an accepted solution.

Hey @Antonio84,

 

Those values come from checkout localisation extensions and should be available on the resulting Order.
localizationExtensions connection. 

 

I haven't found a way to retrieve them with the REST API, but you should be able to use the GraphQL Admin API to check the values with a query like this:

 

query localisedOrder($order: ID!){
 order(id: $order) {
   id
   name
   localizationExtensions(first: 1) {
     nodes {
       key
       value
     }
   }
 }
}

 

Hope that helps!

 

- James

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 6 (6)

Liam
Community Manager
3108 342 884

Hi Antonio84,

 

Just to confirm - are those fields added by a checkout UI extension or a native part of the checkout?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Antonio84
Shopify Partner
50 1 3

They are not extensions,  it was added by shopify.

Liam
Community Manager
3108 342 884

Okay Antonio - it does look like this is a new field and the data entered during checkout is added to the orders "Additional Information" section on the admin. It's possible it's not yet accessible via our API but I'm asking our internal dev team about this now. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Liam
Community Manager
3108 342 884

Hi again,

 

From looking into this a bit more, it may be possible to access this info from the `note_attributes` property on the order resource. Try making a GET call to see if the required info is being displayed.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Antonio84
Shopify Partner
50 1 3

There aren't in the "note_attributes" field, I've tried.

ShopifyDevSup
Shopify Staff
1453 238 518

This is an accepted solution.

Hey @Antonio84,

 

Those values come from checkout localisation extensions and should be available on the resulting Order.
localizationExtensions connection. 

 

I haven't found a way to retrieve them with the REST API, but you should be able to use the GraphQL Admin API to check the values with a query like this:

 

query localisedOrder($order: ID!){
 order(id: $order) {
   id
   name
   localizationExtensions(first: 1) {
     nodes {
       key
       value
     }
   }
 }
}

 

Hope that helps!

 

- James

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog