Go / Bond APIs / delete card restriction
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
http.SetRequestHeader("Content-Type","application/json")
http.SetRequestHeader("Authorization","{{authorization}}")
http.SetRequestHeader("Identity","{{identity}}")
resp := http.QuickRequest("DELETE","https://{{environment}}.bond.tech/api/v0/cards/{{card_id}}/restrictions/{{restriction_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 "Content-Type: application/json"
-H "Authorization: {{authorization}}"
-H "Identity: {{identity}}"
https://{{environment}}.bond.tech/api/v0/cards/{{card_id}}/restrictions/{{restriction_id}}
Postman Collection Item JSON
{
"name": "delete card restriction",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json",
"disabled": true
},
{
"key": "Authorization",
"type": "text",
"value": "{{authorization}}"
},
{
"key": "Identity",
"type": "text",
"value": "{{identity}}"
},
{
"key": "",
"value": "",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{environment}}.bond.tech/api/v0/cards/{{card_id}}/restrictions/{{restriction_id}}",
"protocol": "https",
"host": [
"{{environment}}",
"bond",
"tech"
],
"path": [
"api",
"v0",
"cards",
"{{card_id}}",
"restrictions",
"{{restriction_id}}"
]
},
"description": "Add Card financial Core"
},
"response": [
{
"name": "delete card restriction",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json",
"disabled": true
},
{
"key": "Authorization",
"type": "text",
"value": "{{authorization}}"
},
{
"key": "Identity",
"type": "text",
"value": "{{identity}}"
},
{
"key": "",
"value": "",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{environment}}.bond.tech/api/v0/cards/{{card_id}}/restrictions/{{restriction_id}}",
"protocol": "https",
"host": [
"{{environment}}",
"bond",
"tech"
],
"path": [
"api",
"v0",
"cards",
"{{card_id}}",
"restrictions",
"{{restriction_id}}"
]
}
},
"_postman_previewlanguage": "json",
"header": null,
"cookie": [
],
"body": "{\n \"card_id\": \"2742ff6a-7455-4066-8b45-ae12d3acca34\",\n \"last_four\": \"6169\",\n \"status\": \"Reissued\"\n}"
}
]
}