Chilkat Online Tools

PureBasic / Broker API / Transfer

Back to Collection Items

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

    CkHttp::setCkBasicAuth(http, 1)
    CkHttp::setCkLogin(http, "{{api_key}}")
    CkHttp::setCkPassword(http, "{{api_secret}}")

    resp.i = CkHttp::ckQuickRequest(http,"DELETE","https://domain.com/v1/accounts/:account_id/transfers/:transfer_id")
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        ProcedureReturn
    EndIf

    Debug Str(CkHttpResponse::ckStatusCode(resp))
    Debug CkHttpResponse::ckBodyStr(resp)
    CkHttpResponse::ckDispose(resp)



    CkHttp::ckDispose(http)


    ProcedureReturn
EndProcedure

Curl Command

curl -X DELETE
	-u '{{api_key}}:{{api_secret}}'
https://domain.com/v1/accounts/:account_id/transfers/:transfer_id

Postman Collection Item JSON

{
  "name": "Transfer",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{HOST}}/v1/accounts/:account_id/transfers/:transfer_id",
      "host": [
        "{{HOST}}"
      ],
      "path": [
        "v1",
        "accounts",
        ":account_id",
        "transfers",
        ":transfer_id"
      ],
      "variable": [
        {
          "key": "account_id",
          "value": null
        },
        {
          "key": "transfer_id",
          "value": null
        }
      ]
    }
  },
  "response": [
  ]
}