GET /v2/customers/{customer_id}
GET /v2/customers?query=tax_code:{tax_code}
其中,参数{tax_code}需要替换为要查询的税码。 3. 通过以上步骤,即可通过税码找到相应的客户。以下是一个示例代码:
require 'bigcommerce_api'
api = BigcommerceApi::Client.new({
:store_url => 'store-url',
:username => 'username',
:api_key => 'api-key'
})
# Get customer's tax code
customer = api.get('/customers/{customer_id}')
tax_code = customer['tax_exempt_category']
# Find customers by tax code
customers = api.get("/customers?query=tax_exempt_category:#{tax_code}")