Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a clarification using tRest component is this possible to pass values dynamically?
Example : URL am giving works for POST method only
URL : "https://development.avalara.net/1.0/tax/get.xml"
HTTP Method: POST
HTTP Headers : name: "Authorization" Value : "xyz"
HTTP Body: XML content looks like below
"<Request>
<DocDate>2016-12-08</DocDate>
<CustomerCode>XXX</CustomerCode>
<Addresses>
<Address>
<AddressCode>01</AddressCode>
<City>Texas</City>
<Region>US</Region>
<PostalCode>21234</PostalCode>
</Address>
</Addresses>
<Lines>
<Line>
<LineNo>01</LineNo>
<DestinationCode>01</DestinationCode>
<OriginCode>01</OriginCode>
<ItemCode>M324</ItemCode>
<Qty>1</Qty>
<Amount>100</Amount>
</Line>
</Lines>
</Request>"
My question is Instead of giving XML content I would like to pass <DocDate>2016-12-08</DocDate> in the URL ,is this possible?
So based on the date am passing it should retrieve data!
Thanks in advance.
If endpoint external - You must follow documentation for this service
if it also created by You web-service:
You can pass parameter as query or xml as body
like
"https://development.avalara.net/1.0/tax/get.xml?DocDate=2016-12-08"
if You want pass it as XML - use body
Hi @vapukov
We can't open the URL "https://development.avalara.net/1.0/tax/get.xml?DocDate=2016-12-08" in any browser.It will say file not found.
Using Fiddler web debug proxy tool this URL brings data
So what component I should use for my scenario.Please help me out.
Please have a look at the job below
This is the error I'm facing:
Error:
Starting job gettaxrequest at 10:21 16/06/2017.
[statistics] connecting to socket on port 4073
[statistics] connected
.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------.
| tLogRow_2 |
|=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------=|
|Body |ERROR_CODE|
|=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------=|
|{
"ResultCode": "Error",
"Messages": [
{
"Summary": "The request was unable to be successfully serviced, please try again or contact Customer Service.",
"Severity": "Error",
"Source": "Avalara.Web.REST"}
]
}
|500 |
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------'
[statistics] disconnected
Job gettaxrequest ended at 10:21 16/06/2017. [exit code=0]