Skip to main content

Login

Curfox DMS uses a simple email password sign in which returns a Bearer Token and a User Object on successful sign-ins

Request​

POST - {{url}}/api/public/merchant/login

Headers
{
"Accept": "application/json",
"Content-Type": "application/json",
"X-tenant": "{{ tenant }}",
}
Sample Payload
{
"email": "[email protected]",
"password": "test_merchant_123"
}

Response​

Status - 200 - OK

Sample Response Object
{
"user": {
"id": 2,
"merchant_id": 2,
"first_name": "Mr. John",
"last_name": "Doe",
"email": "[email protected]",
"user_name": "testuser",
"phone": "0779999999",
"is_active": true,
"api_token": "65",
"email_verified_at": null,
"activation_code": null,
"activation_code_expiry": null,
"created_at": "2022-02-12T12:21:03.000000Z",
"updated_at": "2022-03-23T04:41:58.000000Z",
"merchant_name": "Test Merchant (API)",
"role": {
"id": 9,
"is_default": 1,
"name": "2-Admin",
"guard_name": "merchant-api",
"merchant_id": 2,
"description": null,
"created_at": "2022-02-12T12:21:03.000000Z",
"updated_at": "2022-03-08T08:53:06.000000Z",
"pivot": {
"model_id": 2,
"role_id": 9,
"model_type": "Modules\\TenentCore\\Entities\\MerchantUser"
}
},
"merchant": {
"id": 2,
"ref_no": "MC-0002",
"name": "Test Merchant (API)",
"is_active": true,
"rate_card_id": 1,
"created_at": "2022-02-12T12:21:02.000000Z",
"updated_at": "2022-03-23T04:40:01.000000Z"
},
"roles": [
{
"id": 9,
"is_default": 1,
"name": "2-Admin",
"guard_name": "merchant-api",
"merchant_id": 2,
"description": null,
"created_at": "2022-02-12T12:21:03.000000Z",
"updated_at": "2022-03-08T08:53:06.000000Z",
"pivot": {
"model_id": 2,
"role_id": 9,
"model_type": "Modules\\TenentCore\\Entities\\MerchantUser"
}
}
]
},
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiODhkNDdhMzEzZWQ3NDMzYTdjNTQ4OTc3NWI5Yzk2ZGVkNTc4MzMwM2Y0NzhjMTgxZDFlMjM4ZGU3NzhmYzY3YWI4MDg2MmU5YjczN2UyOTQiLCJpYXQiOjE2NDgwMTE3MjIuMjUwNjY0LCJuYmYiOjE2NDgwMTE3MjIuMjUwNjY4LCJleHAiOjE2Nzk1NDc3MjIuMjMzMTkxLCJzdWIiOiIyIiwic2NvcGVzIjpbXX0.VhaFOdMVqAXMWgo7KCt1SVMLpWaZ1YntZZLZAkApF56i0QZZZVl5uRObwRMrFNK9L2H_62JWguExEy6VmVQ7L2mM6yeSoneJv1mpiFJYoqhjvIwj198lYrsBr3IbqUuU1d10pG0om0boKGqDJ_NNLSjZaEkJR0veLRUFDGePAJRU_nLQKPE0W-8nnZKV7N8jS4u2g1dyqNFtALdHkuOxRlB4AXKy16DtioXJBMeoWRRaeU-CERdRG-IYW-_G_bO7lVFR8h3RlTjh8Zww0kLpu-pt45_rch9ZOsVtoPIhFO4cptbpQmWp3de7sNnVwbD5TxDWA-cFHSeXIJ4ePb8f5UDD6ADXAMQ1_6YQHFx2Y3hREF3tmASZ1z_KCzyA-TUkRfq92TucRENgfMj6jnT601xLE0I_DGQf_XYpyqz_w6r_vPpZUs7n06LcOSpjYJ4hFmqjvZhFWtzfMX3aoYhoBCJdsy1a2mTbBOtHR2jSAL3ocn4W7kHdRyDqn2Pej-HN3sseh3PbcHmbYGWyTbg0AdOjlM8X0qptFczQGUMmQ-hnCdCDvw5hSNKw86YH-SKwh1XgV0uapAb7jSHsRXqDMJ3Rm77YlXqVP1sQc40SikDR4ycpcEDfj0rdz23Ku4mlQG-LZWhkaNE-eAzg_MreCj005SBVA9lGy3W09Rm4QFI",
"message": "success"
}

ERRORS​

Entered email has not been registered in the system
{
"message": "Account Not Found"
}
Entered password does not match the entered email
{
"message": "Password Invalid!"
}