Chilkat Online Tools

Go / Egyptian eInvoicing SDK R1.5 / 3. Get Receipt Details

Back to Collection Items

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    http := chilkat.NewHttp()
    var success bool

    // Adds the "Authorization: Bearer <access_token>" header.
    http.SetAuthToken("<access_token>")

    sbResponseBody := chilkat.NewStringBuilder()
    success = http.QuickGetSb("https://domain.com/api/v1/receipts/:uuid/details",sbResponseBody)
    if success == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        sbResponseBody.DisposeStringBuilder()
        return
    }

    fmt.Println("Response status code = ", http.LastStatus())
    fmt.Println(*sbResponseBody.GetAsString())

    http.DisposeHttp()
    sbResponseBody.DisposeStringBuilder()

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://domain.com/api/v1/receipts/:uuid/details

Postman Collection Item JSON

{
  "name": "3. Get Receipt Details",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{generatedAccessToken}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{apiBaseUrl}}/api/v1/receipts/:uuid/details",
      "host": [
        "{{apiBaseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "receipts",
        ":uuid",
        "details"
      ],
      "variable": [
        {
          "key": "uuid",
          "value": "b4c08c8b273c45d6b824b359d87d957345b0ec6859eb4ad7b68221244ca55d85"
        }
      ]
    }
  },
  "response": [
  ]
}