> For the complete documentation index, see [llms.txt](https://suissu.gitbook.io/su-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://suissu.gitbook.io/su-api-documentation/su-token/card/card-view-api.md).

# Card View API

The Card View API is a highly efficient tool that allows you to effortlessly view Credit Card information and its associated details simply by accessing a URL. This API comprises several key components, including the partner ID, token ID (generated during Credit Card creation), and the client's IP address.

After passing the partner ID, token ID, and client IP into the API, it will generate a response containing a URL. This URL can be copied and pasted by the PMS into their system. By accessing this URL, the PMS will be able to conveniently view the card details directly within their own system, facilitating easy and seamless card management.

***

### <mark style="color:yellow;">Endpoint</mark> <a href="#property-endpoint" id="property-endpoint"></a>

<mark style="color:green;background-color:green;">**`POST`**</mark>

```url
https://token.suissu.com/service/api/view
```

<mark style="color:yellow;">**Header Parameters**</mark>

***

`Content-Type` <mark style="color:orange;">**string (Required)**</mark>

Indicates the format of the data that has to be sent or received.

> Example: `application/json`

***

`x-api-name` <mark style="color:orange;">**string (Required)**</mark>

This is for authentication purpose and can be obtained by logging into the Extranet itself.

> Example: `XXXXFIRSTAPP`

{% hint style="info" %} <mark style="color:yellow;">`XXXX`</mark> can be replaced with the client name.
{% endhint %}

***

`x-api-key` <mark style="color:orange;">**string (Required)**</mark>

This is for authentication purpose and can be obtained by logging into the Extranet itself.

> Example: `kfpwsfnknknfwknfkwnknef9823rujfsormDFS3ijoncvowoeorfnv`

{% hint style="info" %}
This key will be unique for every client
{% endhint %}

***

#### <mark style="color:yellow;">**Attributes**</mark>

`partner_id` <mark style="color:orange;">**string (Required)**</mark>

Indicates the unique property ID assigned upon the creation of the property.

***

`token_id` <mark style="color:orange;">**string (Required)**</mark>

Indicates the token ID generated upon creation of a credit card.

***

`client_ip` <mark style="color:orange;">**string (Required)**</mark>

Indicates the client's IP address.

***

### <mark style="color:yellow;">**Sample Request**</mark>

```json
{
  "partner_id": "H1",
  "token_id": "H4sIAAAAAAAAAzO3BADDOtuOAgAAAA==",
  "client_ip": "192.168.0.1"
}
```

***

### <mark style="color:yellow;">**Responses**</mark>

#### <mark style="color:green;">**200 Success Response**</mark>

`status` <mark style="color:orange;">**string**</mark>

Indicates the status of the request.

***

`ErrorMessages` <mark style="color:orange;">**string**</mark>

Indicates the error messages, if any.

***

`URL` <mark style="color:orange;">**string**</mark>

Provides the URL to view the credit card in your system.

***

{% code overflow="wrap" %}

```json
{
  "Status": "Success",
  "ErrorMessages": [],
  "URL": "https://token.suissu.com/service/viewcard/co8mm6hqqe5grmgxmvn60f7z2zcyuapaq3isxwjn4zlvmtmp"
}
```

{% endcode %}

***

#### <mark style="color:red;">**400 Bad Request**</mark>

`status` <mark style="color:orange;">**string**</mark>

Indicates the status of the request.

***

`ErrorMessages` <mark style="color:orange;">**string**</mark>

Indicates the error messages, if any.

```json
{
  "Status": "Fail",
  "ErrorMessages": [
    "client_ip : Invalid or missing client IP"
  ]
}
```

***

#### <mark style="color:red;">**401 Unauthorized**</mark>

`status` <mark style="color:orange;">**string**</mark>

Indicates the status of the request.

***

`ErrorMessages` <mark style="color:orange;">**string**</mark>

Indicates the error messages, if any.

<pre class="language-json"><code class="lang-json">{
  "Status": "Fail",
  "ErrorMessages": [
    "Unauthorised"
<strong>  ]
</strong>}
</code></pre>
