Get a country field using Admin API
This guide explains how to use the Admin API to return a country field collected during checkout.
Access scopes
To use the Admin API to access the information collected in the checkout, your app needs to request the read_order
access scope for a ShopBase store. For more information on requesting access scopes when your app is installed, see API Access Scopes
Collect a country field on the checkout
For this tutorial, you'll set the address of your shop to Brazil (since Brazilian merchants are required to collect a tax ID for government invoicing) and then complete checkout from your storefront:
Set the address of your shop to Brazil. Remember to change your address back when you've completed the tutorial.
From your storefront, add a product to your cart and then complete a checkout.
Complete the checkout.
Get the country field for an order
To get the client country code, use the ShopBase Admin API to retrieve the order.
GET https://shop-name.onshopbase.com/admin/orders/{order_id}.json
SAMPLE RESPONSE
Additional information
For additional information on editing orders, refer to the Admin API reference.
Last updated