# Register

## Upon successful response you will get access token and refresh token

<mark style="color:blue;">`GET`</mark> `https://castleindia.in/emart/public /api/register /api/register`

#### Headers

| Name   | Type   | Description      |
| ------ | ------ | ---------------- |
| Accept | String | application/json |

#### Request Body

| Name     | Type   | Description                                         |
| -------- | ------ | --------------------------------------------------- |
| name     | string | enter user name                                     |
| email    | String | enter valid email address                           |
| mobile   | String | enter user mobile no                                |
| password | String | enter user password min length should be 8 or more. |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "token_type": "Bearer",
  "expires_in": 31536000,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIyIiwianRpIjoiZjk5NDA3NzcxZGFmMzY1ODg0ZGZiOGY4OWJkMWZlOGQ2NDczNzkyYTVhM2FhOGExN2JjMTQ3ZjdmN2ZkMWUzNDY0MDAwZWEyNjViNGNkNDciLCJpYXQiOjE2MTE1NjA3MDgsIm5iZiI6MTYxMTU2MDcwOCwiZXhwIjoxNjQzMDk2NzA3LCJzdWIiOiI0NiIsInNjb3BlcyI6W119.yBc2g4kzwAfyK_vlDQjqaHiZo5HLfLk69i3MgiJFVVfl6eIH9K9qpgFSlrf-aI9aOGIG1EkQFuSU6-r0fU--NORV9aQSM99ZbbikEPzRi6bTCIGnEY01tROHILNRuWwBK5kHyr9JWbpSlc7F7V-VMwcLb1OcmF8jekQiysHeA8NupMBkNnNk9_9QGaiSKDNZTUAEpyf7OZD7diUM28LFoZVUQxiJ_6lOZqA9lysiV9rrcwn6bNMjALlzV8fL0tTIGtU8C5q-w-6LXYb_QVwnZCYCpIP7wRaLWdhrZ-WAPqVNorszlLsOTiBTCw5wsr9SbY-u1VFQGECUvjYfntqGm52uI5k5lH3pZYxNhISbANDLrBUMsQkP1C-to8B1NpQUlU2JoS-BmkWvw43M9L3LRc7eUfg-uYZge9DcjFhEt_RwyO6w3JzeYNxjhsrMSlTo7V44EuEJDK-TyHheu0tq3WP3UtdroqRKyZMxZZBcqalaIUfUZXhJ7k7187-Xjv9_X2lIos39eg42m7hrgK3DOv5jk_f3y0yOgRH0yGe5h7uy3nUShECIjIndIveN7zNB3o2jB5nK7zsulaqHPlly5l17XPvKyeFsn-Tyqg9SAMaRapOIoMSxIPV432JBn3Jn7KqHQsJuB9e-_HbuelMqZvO4RZOf7gpIlrCeOaxDjRs",
  "refresh_token": "def50200368fe11b081f6f4827d5ef3563eae58cf05103fdfbfb4c635631ab9d0aef66172dd006386074eeb16363661aa15fe31a860df64d7d3c5f015757b500b9623ed1ec4b331a6829eb06d7fc8b8aef7523acf9f322f7e251829edade45e27fde4468801ad7bad4665277dcf5bb9984b2de7d805338466ccfedc38fa95ec954a4db95df2145fbfbdc76e80503eab725450f4f86468dc9e464f61e58324ab839d99b07e0f620d10f592241342eb75eb19fad0844b8f664e6e224938931d4e783456169e604296ddc2b4e0d2a2a988e32de31d0249b6ddc1ae9c2567c18b58471a5fb4f020655e0e9b381bbea2880e91e07bb362b92e003fda9142cdf8e79a5d5b961713a32031653a387328eeab43dfe9e00d1c730c34348cf59d0558f16e3971fb1a5c098ac63d9a68a49675894d86406284c12c08765002e25d84b7d713f7a2bc6e7c89f9c4b7fbb62dc0e8914ea6112cdaa0e49d5eda236b563501c14459592"
}
```

{% endtab %}
{% endtabs %}

## IF response fail

```
<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8" />
	<meta name="robots" content="noindex,nofollow,noarchive" />
	<title>An Error Occurred: Method Not Allowed</title>
	<style>
		body {
			background-color: #fff;
			color: #222;
			font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
			margin: 0;
		}

		.container {
			margin: 30px;
			max-width: 600px;
		}

		h1 {
			color: #dc3545;
			font-size: 24px;
		}

		h2 {
			font-size: 18px;
		}
	</style>
</head>

<body>
	<div class="container">
		<h1>Oops! An Error Occurred</h1>
		<h2>The server returned a "405 Method Not Allowed".</h2>

		<p>
			Something is broken. Please let us know what you were doing when this error occurred.
			We will fix it as soon as possible. Sorry for any inconvenience caused.
		</p>
	</div>
</body>

</html>
```
