API documentation

Update card information

PATCH/PUT /api/car_driver/cards/:id

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This web service is used for updating the following card information: card description and the default card flag.

REQUEST PARAMETERS

Parameter name Parameter type Description
id int id of the card
card object object containing card information
description string description of the card set by the user
is_default bool true if it is the user's default card
{
   "card" :
   {
      "description" : "Blue VISA",
      "is_default" : true
   }
}

Response

Status Code: 200 if OK

{ 
      "id" : 12,
      "description" : "Blue VISA",
      "card_mask" : "9****5098",
      "is_default" : true
}
Parameter name Parameter type Description
id int id of the card
description string description of the card set by the user
card_mask string mask of the card that can be displayed to the user ex:'1****2345'
is_default bool true if it is the user's default card

Status Code: 400 if "card" or "description" is missing

Status Code: 401 if request access token not ok

Status Code: 404 if card cannot be found for the current user