Sends a request to get a JSON response that contains a list of JSON validation schemas for available receipt types
curl -H "Authorization: Bearer {YOUR ACCESS TOKEN}" https://us.api.concursolutions.com/receipts/schemas/
[Reflection.Assembly]::LoadFile("C:\myAssemblies\ChilkatDotNet2.dll")
$rest = New-Object Chilkat.Rest
# URL: https://us.api.concursolutions.com/receipts/schemas/
$bTls = $true
$port = 443
$bAutoReconnect = $true
$success = $rest.Connect("us.api.concursolutions.com",$port,$bTls,$bAutoReconnect)
if ($success -ne $true) {
$("ConnectFailReason: " + $rest.ConnectFailReason)
$($rest.LastErrorText)
exit
}
$rest.AddHeader("Authorization","Bearer {YOUR ACCESS TOKEN}")
$sbResponseBody = New-Object Chilkat.StringBuilder
$success = $rest.FullRequestNoBodySb("GET","/receipts/schemas/",$sbResponseBody)
if ($success -ne $true) {
$($rest.LastErrorText)
exit
}
$respStatusCode = $rest.ResponseStatusCode
if ($respStatusCode -ge 400) {
$("Response Status Code = " + $respStatusCode)
$("Response Header:")
$($rest.ResponseHeader)
$("Response Body:")
$($sbResponseBody.GetAsString())
exit
}
$jsonResponse = New-Object Chilkat.JsonObject
$jsonResponse.LoadSb($sbResponseBody)
$i = 0
$count_i = $jsonResponse.SizeOfArray("receiptSchemas")
while ($i -lt $count_i) {
$jsonResponse.I = $i
$rel = $jsonResponse.StringOf("receiptSchemas[i].rel")
$method = $jsonResponse.StringOf("receiptSchemas[i].method")
$href = $jsonResponse.StringOf("receiptSchemas[i].href")
$i = $i + 1
}
$i = 0
$count_i = $jsonResponse.SizeOfArray("supportingSchemas")
while ($i -lt $count_i) {
$jsonResponse.I = $i
$rel = $jsonResponse.StringOf("supportingSchemas[i].rel")
$method = $jsonResponse.StringOf("supportingSchemas[i].method")
$href = $jsonResponse.StringOf("supportingSchemas[i].href")
$i = $i + 1
}
{
"receiptSchemas": [
{
"rel": "http://schema.concursolutions.com/air-receipt.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/air-receipt.schema.json"
},
{
"rel": "http://schema.concursolutions.com/car-rental-receipt.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/car-rental-receipt.schema.json"
},
{
"rel": "http://schema.concursolutions.com/general-receipt.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/general-receipt.schema.json"
},
{
"rel": "http://schema.concursolutions.com/ground-transport-receipt.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/ground-transport-receipt.schema.json"
},
{
"rel": "http://schema.concursolutions.com/hotel-receipt.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/hotel-receipt.schema.json"
},
{
"rel": "http://schema.concursolutions.com/jpt-ic-card-receipt.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/jpt-ic-card-receipt.schema.json"
},
{
"rel": "http://schema.concursolutions.com/rail-receipt.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/rail-receipt.schema.json"
}
],
"supportingSchemas": [
{
"rel": "http://schema.concursolutions.com/address-original.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/address-original.schema.json"
},
{
"rel": "http://schema.concursolutions.com/address.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/address.schema.json"
},
{
"rel": "http://schema.concursolutions.com/common.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/common.schema.json"
},
{
"rel": "http://schema.concursolutions.com/discount.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/discount.schema.json"
},
{
"rel": "http://schema.concursolutions.com/line-item.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/line-item.schema.json"
},
{
"rel": "http://schema.concursolutions.com/location.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/location.schema.json"
},
{
"rel": "http://schema.concursolutions.com/merchant.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/merchant.schema.json"
},
{
"rel": "http://schema.concursolutions.com/payments.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/payments.schema.json"
},
{
"rel": "http://schema.concursolutions.com/receipt-core.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/receipt-core.schema.json"
},
{
"rel": "http://schema.concursolutions.com/taxes.schema.json",
"method": "GET",
"href": "https://us.api.concursolutions.com/receipts/schemas/taxes.schema.json"
}
]
}