- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Set Tax Entity/Use Code for TaxExemptStatus=Yes via REST
Is it posible to set the Tax Entity/Use Code field via rest-api? I'm struggling to create accounts with TaxExemptStatus set to "Yes" without TaxExemptCertificateID. Tax Exempt Certificate ID or Entity/Use Code is required, but I can't find a way to set Entity/Use Code.
POST-Query (https://rest.sandbox.eu.zuora.com/v1/object/account😞
{ "AccountNumber": "1234567890", "AllowInvoiceEdit": "false", "AutoPay": "false", "Batch": "Batch1", "BcdSettingOption": "AutoSet", "BillCycleDay": "", "Currency": "EUR", "InvoiceDeliveryPrefsEmail": "false", "InvoiceDeliveryPrefsPrint": "true", "Name": "TestAccount Name", "Status": "Draft", "TaxExemptStatus": "Yes", "TaxExemptCertificateID": "" }
Response:
{ "Errors": [ { "Code": "INVALID_VALUE", "Message": "Tax Exempt Certificate ID or Entity/Use Code is required" } ], "Success": false }
I tried to create an account via web interface and than queried the account information via GET. As part of the response I've got:
"taxInfo": { "exemptStatus": "Yes", "exemptCertificateId": "", "exemptCertificateType": "", "exemptIssuingJurisdiction": "", "exemptEffectiveDate": null, "exemptExpirationDate": null, "exemptDescription": "", "exemptEntityUseCode": "Company proof", "companyCode": null, "VATId": "" },
But I wasn't able to rebuild this part in the create request.
Looking forward to your responses,
thanks in advance
Manuel
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Set Tax Entity/Use Code for TaxExemptStatus=Yes via REST
Hi Manuel,
The field TaxExemptEntityUseCode is only available for WSDL Version 91.0+, since the PUT Account account defaults to WSDL V79.0, you will have to pass a header of x-zuora-wsdl-version: 91.0 as below:
PUT https://rest.apisandbox.zuora.com/v1/object/account/2c92c0f85241744101524328194e632b
Content-Type: application/json
x-zuora-wsdl-version: 91.0
{
"TaxExemptCertificateID": "1234567890",
"TaxExemptCertificateType": "Tax Exempt Certificate",
"TaxExemptDescription": "Tax Exempt Description",
"TaxExemptEffectiveDate": "2018-11-01",
"TaxExemptEntityUseCode": "2c93808457d787030157e03220684fac",
"TaxExemptExpirationDate": "2020-12-31",
"TaxExemptIssuingJurisdiction": "Tax Exempt Issuing Jurisdiction",
"TaxExemptStatus": "Yes",
"VATId": "1234567890"
}
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √