Assign a card to a cardholder
This operations allow you to assign a card from the stock to a cardholder.
HTTP Request
PUT /cards
Header Parameters
Header | Description |
---|---|
Autorization required | The Bearer token created in Get authorization Token |
Content-Type required | application/json |
Body Parameters
Parameter | Type | Pattern | Description |
---|---|---|---|
card_number required | string | 16 digits* | The card_number to be assigned |
cardholder_id required | string | uuid | The cardholder's id. |
document_type required | string | Document Type | The cardholder's document type to be registeres with the card. See allowed values in Get Document Type Catalog |
document_number required | string | 1-27 characters | The document number belonging to the document type |
latitude required | float | Digits format "DD.ddddd" (5 decimal precision) | Latitude from where the assignment is made. South latitudes are preceded by a minus sign. Latitudes range from -90 to 90 |
longitude required | float | Digits format "DDD.ddddd" (5 decimal precision) | Longitude from where the assignment is made. West longitudes are preceded by a minus sign. Longitudes range from -180 to 180 |
observations optional | string | 0-100 characters | Some comment about the assignation |
note
*If card_number is sended as 16 digits, it must be sended ciphered and Base 64 Encoded. See Data encryption & encoding.
Example JSON Request:
{
"card_number":"t7wog3ytUChBC2xdLNe-sAQ-VXt7xgDi6U_iNSGQPyA7hPBYs1-_mLt",
"cardholder_id": "55555555-daa7-1234-aaaa-123123123ecd",
"document_type": "INE",
"document_number": "1234123412",
"observations":"",
"latitude": 12.65343,
"longitude": -134.87536
}
Example JSON Response:
{
"success": true,
"code": 0,
"message": "OK",
"data": {
"cardholder": {
"id": "ab123456-1qq2-1234-tt5g-8873fe52bf54" ,
"first_name": "John",
"second_name": "Doe",
"surname": "González",
"second_surname": "Pérez",
"rfc": "XAXX010101000",
"curp": "XEXX010101HNEXXXA4"
},
"card": {
"id": "11111111-daa7-1234-aaaa-123123123ecd",
"type": "PHISYCAL",
"status": "NEED_ACTIVATION",
"masked_card_number": "************1234",
"card_number": "************1234"
},
"account": {
"id": "22222222-daa7-1234-aaaa-123123123ecd",
"reference": "555555555",
"clabe": null
}
}
}