Skip to content

Bank Cards

José Antonio Córdoba Gómez edited this page Jan 8, 2021 · 2 revisions

Microservice Cards

POST /cards

Postman Request-Response

0

Curl Request

curl --location --request POST 'http://0.0.0.0:3032/cards' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "507f1f77bcf86cd799439011507f1f77bcf86cd799439011",
    "number" : "5555111122223333",
    "cvc" : "584",
    "date_limit": "6 de enero de 2021",
    "status": true
}'
Server Side

Console log

cloudbanking-card       | INFO [POST] /cards
cloudbanking-card       | INFO Card added successfully
cloudbanking-card       | DEBUG   200 OK {"content-type": @["application/json"]}

GET /cards/{id}

Postman Request-Response

1

Curl Request

curl --location --request GET 'http://0.0.0.0:3032/cards/507f1f77bcf86cd799439011507f1f77bcf86cd799439011'
Server Side

Console log

cloudbanking-card       | DEBUG GET /cards/507f1f77bcf86cd799439011507f1f77bcf86cd799439011
cloudbanking-card       | INFO [GET] /cards/{id}
cloudbanking-card       | INFO Card founded

DELETE /cards/{id}

Postman Request-Response 2

Curl Request

curl --location --request DELETE 'http://0.0.0.0:3032/cards/507f1f77bcf86cd799439011507f1f77bcf86cd799439011'
Server Side

Console log

cloudbanking-card       | DEBUG DELETE /cards/507f1f77bcf86cd799439011507f1f77bcf86cd799439011
cloudbanking-card       | INFO [GET] /cards/{id}
cloudbanking-card       | INFO Card was deleted successfully
Clone this wiki locally