Chilkat Online Tools

DataFlex / CardPointe API Integration / Profile (Delete)

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vResp
    Handle hoResp
    String sTemp1
    Integer iTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Send ComSetRequestHeader To hoHttp "Authorization" "Basic dGVzdGluZzp0ZXN0aW5nMTIz"
    Send ComSetRequestHeader To hoHttp "Content-Type" "application/json"

    Get ComQuickRequest Of hoHttp "DELETE" "https://domain.com/profile/{{profileid}}/{{acctid}}/{{merchid}}" To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComStatusCode Of hoResp To iTemp1
    Showln iTemp1
    Get ComBodyStr Of hoResp To sTemp1
    Showln sTemp1
    Send Destroy of hoResp


End_Procedure

Curl Command

curl -X DELETE
	-H "Authorization: Basic dGVzdGluZzp0ZXN0aW5nMTIz"
	-H "Content-Type: application/json"
https://domain.com/profile/{{profileid}}/{{acctid}}/{{merchid}}

Postman Collection Item JSON

{
  "name": "Profile (Delete)",
  "request": {
    "method": "DELETE",
    "header": [
      {
        "key": "Authorization",
        "value": "Basic dGVzdGluZzp0ZXN0aW5nMTIz"
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": ""
    },
    "url": {
      "raw": "{{url}}/profile/{{profileid}}/{{acctid}}/{{merchid}}",
      "host": [
        "{{url}}"
      ],
      "path": [
        "profile",
        "{{profileid}}",
        "{{acctid}}",
        "{{merchid}}"
      ]
    },
    "description": "[Profile Documentation](https://developer.cardconnect.com/cardconnect-api#profile)"
  },
  "response": [
  ]
}