Reference

This is a flat view of all the representations and relations. If you would rather explore our API starting from the Entry Point, please use the Browser.

Quick reminder:
  • Representation: a set of name-value pairs representing the state of a resource.
  • Relation: the identifier of a link between two resources.

cards

  1. card-representation
  2. get-card
  3. search-card-by-id

1. card-representation

Description: A representation of a card resource. A card is a method of payment.

Properties
id
The card id. Constraints: 36 characters or less, Read-Only.
bin
The card's bank identification number. Constraints: Text, 6 characters, Read-Only.
country
The issuing country of the card. Constraints: Text, an ISO-3166-1 standard alpha-2 country code (e.g. FR for France), Read-Only.
type
The type of card. Constraints: Text, set to visa or mastercard, Read-Only.
lastDigits
The last four digits of the card number. Constraints: Text, 4 characters, Read-Only.
valid
A flag to indicate the validity of the card. Constraints: Boolean, Read-Only.
expirationMonth
The card's expiration month. Constraints: Text, 2 characters or less, Read-Only.
expirationYear
The card's expiration year. Constraints: Text, 4 characters, Read-Only.

2. get-card (relation)

Description: Retrieve the representation of a card resource.

Properties

No dynamic property needed. This usually means that the server already took the liberty to build the full URL for you depending on the context. Less code for you!

Example: Retrieve a card representation
Request
GET follow(https://api.slimpay.net/alps#get-card) HTTP/1.1
Accept: application/hal+json; profile="https://api.slimpay.net/alps/v1"
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJhcGkiXSwiZXhwIjoxNTMwNjMzNTk0LCJqdGkiOiI2ODNmNGE1Ni1kZjQ3LTQ0ZWYtYmIxYy02MDJhYmFlNGYwYjgiLCJjbGllbnRfaWQiOiJkZW1vY3JlZGl0b3IwMSJ9.VSmbmu4upmKj5_lTiBlqtbqSH42yx83AB1IFXJs08Tw
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json; profile="https://api.slimpay.net/alps/v1";charset=UTF-8
Content-Length: 363

{
    "bin": "453268",
    "country": "FR",
    "expirationMonth": 12,
    "expirationYear": 2022,
    "id": "fb081e2c-f83f-11e6-84e7-000000000000",
    "lastDigits": "3268",
    "type": "visa",
    "valid": false,
    "_links": {
        "self": {
            "href": "https://api.preprod.slimpay.com/cards/fb081e2c-f83f-11e6-84e7-000000000000"
        },
        "profile": {
            "href": "https://api.preprod.slimpay.com/alps/v1/cards"
        }
    }
}

3. search-card-by-id (relation)

Description: Search for a specific card resource, using its id property.

Properties
id
The card id. Constraints: 36 characters or less, Read-Only.
Example: Search a card by id
Request
GET follow(https://api.slimpay.net/alps#search-card-by-id) HTTP/1.1
Accept: application/hal+json; profile="https://api.slimpay.net/alps/v1"
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJhcGkiXSwiZXhwIjoxNTMwNjMzNTk0LCJqdGkiOiI2ODNmNGE1Ni1kZjQ3LTQ0ZWYtYmIxYy02MDJhYmFlNGYwYjgiLCJjbGllbnRfaWQiOiJkZW1vY3JlZGl0b3IwMSJ9.VSmbmu4upmKj5_lTiBlqtbqSH42yx83AB1IFXJs08Tw