Skip to content

Close Card

Request URL

DELETE /cards/:AFiCardId

Description

This endpoint closes a card. The card is identified by the path parameter.

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'DELETE',
  url: '${AMPLIFI_BASE_URL}/cards/:AFiCardId',
  headers: {
    'Content-Type': "application/json",
    'token': "A long random string token received from /token request"
  },
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/cards/:AFiCardId"  --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 CARDS/:AFICARDID SUCCESSFUL RESPONSE CLOSING CARD

HEADERS

Header Value
Content-Type application/json
token A long random string token received from /token request

PARAMETERS

Parameter Description Value
AFiCardId [required] qwegalq11xn6prxjp

REQUEST BODY

none

RESPONSE BODY

{
    "success": true,
    "userId": "qweaurl8kgtlv9pc"
}