Chilkat Online Tools

Go / Zoho CRM REST APIs / Invoices

Back to Collection Items

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

    http := chilkat.NewHttp()
    var success bool

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

    resp := http.QuickRequest("DELETE","https://domain.com/crm/v2.1/Invoices/{{record_id}}")
    if http.LastMethodSuccess() == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        return
    }

    fmt.Println(resp.StatusCode())
    fmt.Println(resp.BodyStr())
    resp.DisposeHttpResponse()

    http.DisposeHttp()

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://domain.com/crm/v2.1/Invoices/{{record_id}}

Postman Collection Item JSON

{
  "name": "Invoices",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{api-domain}}/crm/v2.1/Invoices/{{record_id}}",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2.1",
        "Invoices",
        "{{record_id}}"
      ]
    },
    "description": "To delete entities or records from the Invoices module."
  },
  "response": [
  ]
}