PureBasic / DocuSign REST API / Returns a list of envelope transfer rules in the specified account.
        
        Back to Collection Items
        IncludeFile "CkJsonObject.pb"
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"
Procedure ChilkatExample()
    ; This example assumes the Chilkat API to have been previously unlocked.
    ; See Global Unlock Sample for sample code.
    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf
    success.i
    queryParams.i = CkJsonObject::ckCreate()
    If queryParams.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf
    CkJsonObject::ckUpdateString(queryParams,"count","{{count}}")
    CkJsonObject::ckUpdateString(queryParams,"start_position","{{start_position}}")
    ; Adds the "Authorization: Bearer {{accessToken}}" header.
    CkHttp::setCkAuthToken(http, "{{accessToken}}")
    CkHttp::ckSetRequestHeader(http,"Accept","application/json")
    resp.i = CkHttpResponse::ckCreate()
    If resp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf
    success = CkHttp::ckHttpParams(http,"GET","https://domain.com/v2.1/accounts/{{accountId}}/envelopes/transfer_rules",queryParams,resp)
    If success = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(queryParams)
        CkHttpResponse::ckDispose(resp)
        ProcedureReturn
    EndIf
    Debug Str(CkHttpResponse::ckStatusCode(resp))
    Debug CkHttpResponse::ckBodyStr(resp)
    CkHttp::ckDispose(http)
    CkJsonObject::ckDispose(queryParams)
    CkHttpResponse::ckDispose(resp)
    ProcedureReturn
EndProcedure
        Curl Command
        curl -G -d "count=%7B%7Bcount%7D%7D"
	-d "start_position=%7B%7Bstart_position%7D%7D"
	-H "Accept: application/json"
	-H "Authorization: Bearer {{accessToken}}"
https://domain.com/v2.1/accounts/{{accountId}}/envelopes/transfer_rules
        Postman Collection Item JSON
        {
  "name": "Returns a list of envelope transfer rules in the specified account.",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/transfer_rules?count={{count}}&start_position={{start_position}}",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "v2.1",
        "accounts",
        "{{accountId}}",
        "envelopes",
        "transfer_rules"
      ],
      "query": [
        {
          "key": "count",
          "value": "{{count}}"
        },
        {
          "key": "start_position",
          "value": "{{start_position}}"
        }
      ],
      "variable": [
        {
          "key": "accountId",
          "value": "{{accountId}}"
        }
      ]
    }
  },
  "response": [
  ]
}