---
# System prepended metadata

title: 20200911_DRAPI-476 GC changes sync up

---

# 20200911_DRAPI-476 GC changes sync up

* GC API error response
    * 404 - tax id not found
    * 400 - not applicable
    * 400 - format, DRAPI 不處理, error wrapped TIS Bad Request res, DRAPI 不會收到 error
    * 400 - missing required tax id, ex. BR
    
    
* Checkout integrates w/ TaxExcemptionROWService
    * feature toggle -> deprecaed(applyTaxIdsOfCustomerToRequisition), new GC API(applyRequisitionTaxIds)
    * New GC API component: 
        * TaxNumberServiceController (just for QA)
            * header "apiToken" = "gc_auto_token"
        * TaxNumberServiceImpl#applyRequisitionTaxIds (new GC A
        * PI)
        * ApplyRequisitionTaxIdRequest
            * entityCode: could not be override
            * taxIdentifierIds: null / [] / [""]
            * hostedTaxIds: customer-associate tax id
            * postman use gc-auth-token (for QA internal)
        * ApplyRequisitionTaxIdResult
            * enum Status


* Postman Demo
    * success
    * BR missing required
    * tax id not found
        * invalidTaxIds = [xxx]
    * BR order, DE tax id
        * status = INVALID_TAX_IDENTIFIER_IDS
    * CZ tax id, state = invalid
        * response.status = OK
        * response.applicableTaxIds = [] // state not valid
    * FR tax id, has state trasition
        * verifiedName, verifiedAddress 不會變動
    * FR, business order, optional
        * request.customerId = null, taxIds = null
        * response.status = OK
    * Invalid orderInfo
        * response.status = INVALID_ORDER_INFO
    * hostedTaxIds 不合法
        * response.status = OK
        * 不會出現在 applicableTaxIds
    * hostedTaxIds = DE
        * verifiedName, verifiedAddress = null
    * hostedTaxIds 不合法
        * API will wrap Bad Reques error (see pagehits log)
        * response.status = OK


* Supplment
    * UK 脫離 EU, QA 盡量不用 UK tax id
    * VIES 是EU 系統
    * CZ tax id 不會送去 Sabbrix
        * is_buyer_vat_numberm buyer_vat_number = null
        * VIES not valid 表示 VIES 沒授權 DR 收稅; invoice 還是會 show tax id, for company accounting
    * **BR tax id 不須送 Sabbrix**, tax id is for government to track people shopping behavior, which is nothing to do with computing tax. *** 不用測試
    * postman tis key is DEV env. 
        * **x-client-id = shopex1** (Tax ids in TIS are associate with Site) 