---
# System prepended metadata

title: Sancus

---

Sancus
==

## Backend Deliverable
- Benefit list API -> done
- Deals list API -> done
- Deal Purchase API -> done
- Benefit Validate API(QR scan) -> done
- Benefit Avail API -> done
- Transaction History API (latest 50+cached) -> done
- Pocket FAQ -> done


## Frontend Deliverable
- Internal business logic(like gold user should see all the benefit from gold to lower)
- in benefit qr. frontend must validate whether that particular user is eligible for that benefit.


# API Documentation

### Get Pocket by ID
#### Url (Gateway)
```
http://api.p-stageenv.xyz/v1/sancus/pocket
```

#### Url (Internal)
```
/api/v1/pocket
```
#### Verb
```
GET
```

#### Headers (Gateway)

| Key |  Value  | Description |
| ---------- | ------ | ----------- |
| Authorization  | Bearer {{token}} | |


#### Headers (Internal)

| Key        | Value  | type | Description |
| ---------- | ------ | ---- | ----------- |
| id         | 4432   | int  |       user's legacy id |
| uuid  | "5c30835070496711585309"  | string | user's uuid|
| number  | "01853423423" | string | user's phone number
| city_id  | 1 | int  | user's city id|
| country_id  | 1  | int | user's country id|


#### Response Payload
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
    "id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
    "legacy_id": 8475,
    "type": "user",
    "points": 7005,
    "level": "platinum",
    "enabled": true,
    "badge_url": "https://quicksilver-qa.pathaopay.xyz/images/platinum-badge.png",
    "next_level_message": "Congratulations! You've reached the highest level.",
    "level_percentage": 100,
    "text_color_code": "#334C8F",
    "background_color_code": "#EBF0FF",
    "term_points": 7005,
    "status": "active"
}
```


### Get List of Benefits


#### Url (Gateway)
```
http://api.p-stageenv.xyz/v1/sancus/marketplace/benefits?city={city}&level={level}
```
#### Url (Internal)
```
/api/v1/marketplace/benefits?city={city}&level={level}

```
#### Verb
```
GET
```
#### Query Parameters

| Parameters                   | Required | Type               | Description                                                                        |
|-----------------------|----------|--------------------|------------------------------------------------------------------------------------|
| city  | ✔ | N/A |city where benefit can be availed
| level  | ✔ | N/A | level of the users
#### Headers(Gateway)
| Key |  Value  | Description |
| ---------- | ------ | ----------- |
| Authorization  | Bearer {{token}} | |
#### Headers (Internal)

| Key        | Value  | type | Description |
| ---------- | ------ | ---- | ----------- |
| id         | 4432   | int  |       user's legacy id |
| uuid  | "5c30835070496711585309"  | string | user's uuid|
| number  | "01853423423" | string | user's phone number
| city_id  | 1 | int  | user's city id|
| country_id  | 1  | int | user's country id|

#### Response Payload
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
    "benefits": [
        {
            "id": "6020124b91edf3000170a811",
            "title": "Foreign Path",
            "level": [
                "bronze",
                "silver",
                "gold",
                "platinum"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Education",
            "partner_mobile_number": "01753021683",
            "expires_at": {
                "seconds": 1620410399,
                "nanos": 999000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1615836816769311962thumbnail_432e7916-dfb7-4250-b918-2c6ae9642476.jpeg",
            "short_description": "Up-to 20% off",
            "description": "Foreign Path offers  IELTS training, foreign university admission counseling, and visa assistance. Visit their office to enjoy up-to a 20% discount, depending on your level! (T&C apply)",
            "created_by": "Imran",
            "visibility": true,
            "benefit_modality": {
                "bronze": {
                    "amount": 5,
                    "max_discount_amount": 10000000,
                    "short_description": "5% discount",
                    "description": "Foreign Path offers IELTS training, foreign university admissions counseling, and visa assistance. Visit their office to enjoy a 5% discount! (T&C apply)"
                },
                "gold": {
                    "amount": 15,
                    "max_discount_amount": 10000000,
                    "short_description": "15% discount",
                    "description": "Foreign Path offers IELTS training, foreign university admissions counseling, and visa assistance. Visit their office to enjoy a 15% discount! (T&C apply)"
                },
                "platinum": {
                    "amount": 20,
                    "max_discount_amount": 10000000,
                    "short_description": "20% discount",
                    "description": "Foreign Path offers IELTS training, foreign university admissions counseling, and visa assistance. Visit their office to enjoy a 20% discount! (T&C apply)"
                },
                "silver": {
                    "amount": 10,
                    "max_discount_amount": 10000000,
                    "short_description": "10% discount",
                    "description": "Foreign Path offers IELTS training, foreign university admissions counseling, and visa assistance. Visit their office to enjoy a 10% discount! (T&C apply)"
                }
            },
            "address": "Farmgate, Dhaka",
            "socials": {
                "facebook": "https://www.facebook.com/foreignpath"
            },
            "benefit_type": "percentage",
            "location": {
                "lat": 23.7545261,
                "lon": 90.3869943,
                "map_address": "RH Home Center; Suit no-312; Green Road; Dhaka. 1215 Dhaka, Dhaka Division, Bangladesh"
            }
        },
        {
            "id": "6020ceda91edf3000170a812",
            "title": "Ground Zero BD",
            "level": [
                "bronze",
                "silver",
                "gold",
                "platinum"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Lifestyle",
            "partner_mobile_number": "01904302611",
            "expires_at": {
                "seconds": 1620410399,
                "nanos": 999000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1615837256183862203thumbnail_bea1b569-4b07-4db8-b286-51676d7793c1.jpeg",
            "short_description": "Up-to 25% off",
            "description": "Ground Zero is Dhaka's only paintball and entertainment center. Visit with friends or family and enjoy up-to a 25% discount, depending on your level. (T&Cs apply)",
            "created_by": "Imran",
            "visibility": true,
            "benefit_modality": {
                "bronze": {
                    "amount": 10,
                    "max_discount_amount": 10000000,
                    "short_description": "10% discount",
                    "description": "Ground Zero is Dhaka's only paintball and entertainment center. Visit with friends or family and enjoy a 10% discount. (T&Cs apply)"
                },
                "gold": {
                    "amount": 20,
                    "max_discount_amount": 10000000,
                    "short_description": "20% discount",
                    "description": "Ground Zero is Dhaka's only paintball and entertainment center. Visit with friends or family and enjoy a 20% discount. (T&Cs apply)"
                },
                "platinum": {
                    "amount": 25,
                    "max_discount_amount": 10000000,
                    "short_description": "25% discount",
                    "description": "Ground Zero is Dhaka's only paintball and entertainment center. Visit with friends or family and enjoy a 25% discount. (T&Cs apply)"
                },
                "silver": {
                    "amount": 15,
                    "max_discount_amount": 10000000,
                    "short_description": "15% discount",
                    "description": "Ground Zero is Dhaka's only paintball and entertainment center. Visit with friends or family and enjoy a 15% discount. (T&Cs apply)"
                }
            },
            "address": "Vatara, Dhaka",
            "socials": {
                "facebook": "https://www.facebook.com/ground0bd",
                "instagram": "https://www.instagram.com/groundzero_bd/"
            },
            "benefit_type": "percentage",
            "location": {
                "lat": 23.8068846,
                "lon": 90.4247298,
                "map_address": "422 Metro FoodnFun, Abdus Sobhan Dhali Rd, Dhaka-1212"
            }
        },
    }
}
```
#### Response Payload [UPDATE: added city support]
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
    "benefits": [
        {
            "id": "6007ce4d87cf50000153b0d9",
            "title": "Artisan",
            "level": [
                "silver",
                "gold"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Clothing",
            "partner_mobile_number": "121",
            "expires_at": {
                "seconds": 1640995199,
                "nanos": 999000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1610615341847864597thumbnail_f78164f5-ace9-4988-952a-947d9219700f.png",
            "short_description": "B-1/G-2 & more",
            "description": "B-2/G-1 for Silver, B-1/G-1 for Gold",
            "created_by": "team sancus",
            "visibility": true,
            "benefit_modality": {
                "amount": 0,
                "max_discount_amount": 0,
                "short_description": "B-1/G-1 for Gold",
                "description": "Deatils...This modality only works for gold user"
            },
            "address": "All branches",
            "socials": {
                "facebook": "https://www.facebook.com/artisan",
                "twitter": "https://twitter.com/artisan"
            },
            "benefit_type": "verification",
            "location": {
                "lat": 23.8103,
                "lon": 90.4125,
                "map_address": "Road16, Gulshan-1"
            }
        },
        {
            "id": "60864c70eaa0a700017000d9",
            "title": "Burger King",
            "level": [
                "silver",
                "gold",
                "platinum",
                "bronze"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Food",
            "partner_mobile_number": "01712826794",
            "expires_at": {
                "seconds": 1637666849,
                "nanos": 538000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1619414091962083464thumbnail_624e55c8-f9ed-4f90-a412-612dd6d44729.jpeg",
            "short_description": "B-1/G-2 & more",
            "description": "B-3/G-1 for Bronze, B-2/G-1 for Silver, B-1/G-1 for Gold and Platinum",
            "created_by": "team sancus",
            "visibility": true,
            "benefit_modality": {
                "amount": 10,
                "max_discount_amount": 1000,
                "short_description": "B-1/G-1 for Gold",
                "description": "Deatils...This modality only works for gold user"
            },
            "address": "Multiple branches",
            "socials": {
                "facebook": "https://www.facebook.com/burgerking/",
                "instagram": "https://www.instagram.com/burgerking/?hl=en",
                "twitter": "https://twitter.com/burgerking"
            },
            "benefit_type": "verification",
            "location": null
        },
        {
            "id": "60cbb088eaa0a700017000e5",
            "title": "Cats Eye",
            "level": [
                "bronze"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Lifestyle",
            "partner_mobile_number": "99999999996",
            "expires_at": {
                "seconds": 1638316799,
                "nanos": 999000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1623677505382360099thumbnail_cf178b01-cf05-45e9-90ab-e3eb725acc77.png",
            "short_description": "10% discount",
            "description": "Cats Eye is a must-visit clothing outlet for trend-setting fashion lovers in Bangladesh. Visit 19 participating stores nationwide and receive a 10% discount (visit the 'Website' link above to find a list of participating stores)! T&Cs apply.",
            "created_by": "Sawjet",
            "visibility": true,
            "benefit_modality": {
                "amount": 10,
                "max_discount_amount": 10000000,
                "short_description": "10% discount",
                "description": "Cats Eye is a must-visit clothing outlet for trend-setting fashion lovers in Bangladesh. Visit 19 participating stores nationwide and receive a 10% discount (visit the 'Website' link above to find a list of participating stores)! T&Cs apply."
            },
            "address": "Multiple branches",
            "socials": {
                "facebook": "https://facebook.com/CatsEyeLtd",
                "instagram": "https://www.instagram.com/catseyeltd/",
                "website": "https://pathao.com/blog/you-can-enjoy-pathao-points-benefits-from-cats-eye-now/"
            },
            "benefit_type": "percentage",
            "location": null
        },
        {
            "id": "60e55d4aeaa0a700017000e9",
            "title": "Lavender",
            "level": [
                "bronze"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Groceries",
            "partner_mobile_number": "99999999995",
            "expires_at": {
                "seconds": 1640995199,
                "nanos": 999000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1625565985516088140thumbnail_a2ef7237-0134-4be2-923c-f53845dd0c95.png",
            "short_description": "3% discount",
            "description": "Located in Gulshan 2 and Shahjadpur, Lavender is your one-stop shop for a wide range of premium grocery essentials. Visit any of their stores and receive a 3% discount on your bill. (T&Cs apply)",
            "created_by": "Sawjet",
            "visibility": true,
            "benefit_modality": {
                "amount": 3,
                "max_discount_amount": 10000000,
                "short_description": "3% discount",
                "description": "Located in Gulshan 2 and Shahjadpur, Lavender is your one-stop shop for a wide range of premium grocery essentials. Visit any of their stores and receive a 3% discount on your bill. (T&Cs apply)"
            },
            "address": "Multiple branches",
            "socials": {
                "facebook": "https://www.facebook.com/lavendersuperstore",
                "instagram": "https://www.instagram.com/lavendersuperstore/",
                "website": "https://lavendersuperstore.com.bd/"
            },
            "benefit_type": "percentage",
            "location": null
        },
        {
            "id": "601646b987cf50000153b0f1",
            "title": "Pizza Hut",
            "level": [
                "gold",
                "silver"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Food",
            "partner_mobile_number": "01973370750",
            "expires_at": {
                "seconds": 1637666849,
                "nanos": 538000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1612071973222965858thumbnail_7147d77b-0a39-4be3-becc-10b73cd602a0.jpeg",
            "short_description": "Upto 20% off",
            "description": "Upto 10% for Silver, 20% for Gold users",
            "created_by": "team sancus",
            "visibility": true,
            "benefit_modality": {
                "amount": 20,
                "max_discount_amount": 100000,
                "short_description": "Gold 20%",
                "description": "Deatils...This modality only works for gold user"
            },
            "address": "Gulshan-1, Dhaka",
            "socials": {
                "facebook": "https://www.facebook.com/artisan",
                "instagram": "https://www.instagram.com/pizzahut/?hl=en",
                "twitter": "https://twitter.com/artisan"
            },
            "benefit_type": "percentage",
            "location": {
                "lat": 23.8103,
                "lon": 90.4125,
                "map_address": "Road16, Gulshan-1"
            }
        },
        {
            "id": "607e65eceaa0a700017000d4",
            "title": "Rangs Electronics",
            "level": [
                "silver",
                "gold",
                "platinum",
                "bronze"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Electronics",
            "partner_mobile_number": "01999972070",
            "expires_at": {
                "seconds": 1637666849,
                "nanos": 538000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1618895642105418876thumbnail_f841a903-bb76-4918-930a-83d4dbde4012.png",
            "short_description": "B-1/G-2 & more",
            "description": "B-3/G-1 for Bronze, B-2/G-1 for Silver, B-1/G-1 for Gold and Platinum",
            "created_by": "team sancus",
            "visibility": true,
            "benefit_modality": {
                "amount": 0,
                "max_discount_amount": 0,
                "short_description": "B-1/G-1 for Gold",
                "description": "Deatils...This modality only works for gold user"
            },
            "address": "Multiple branches",
            "socials": {
                "facebook": "https://www.facebook.com/sonyrangsbd/"
            },
            "benefit_type": "verification",
            "location": null
        },
        {
            "id": "608581e9eaa0a700017000d7",
            "title": "Rangs Electronics-Ctg",
            "level": [
                "gold",
                "platinum",
                "bronze",
                "silver"
            ],
            "status": "published",
            "city": [
                "chattogram"
            ],
            "partner_type": "Electronics",
            "partner_mobile_number": "02020202022",
            "expires_at": {
                "seconds": 1637666849,
                "nanos": 538000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1618895642105418876thumbnail_f841a903-bb76-4918-930a-83d4dbde4012.png",
            "short_description": "B-1/G-2 & more",
            "description": "B-3/G-1 for Bronze, B-2/G-1 for Silver, B-1/G-1 for Gold and Platinum",
            "created_by": "team sancus",
            "visibility": true,
            "benefit_modality": {
                "amount": 10,
                "max_discount_amount": 1000,
                "short_description": "B-1/G-1 for Gold",
                "description": "Deatils...This modality only works for gold user"
            },
            "address": "Multiple branches",
            "socials": {
                "facebook": "https://www.facebook.com/sonyrangsbd/"
            },
            "benefit_type": "verification",
            "location": null
        },
        {
            "id": "61126ad80b12c60001e00615",
            "title": "The Westin Dhaka",
            "level": [
                "silver",
                "gold",
                "platinum"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "Hospitality",
            "partner_mobile_number": "01730374872",
            "expires_at": {
                "seconds": 1641081599,
                "nanos": 999000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1628422785242026507thumbnail_4b26597d-08d0-4e8c-962c-551a137ec5ca.jpg",
            "short_description": "Up-to 15% off",
            "description": "The Westin Dhaka is Gulshan's premier five-star hotel. Visit us & enjoy up-to 15% off at Splash, our famous poolside restaurant on the 5th floor, as well as our laundry/dry-cleaning services.",
            "created_by": "Marjia",
            "visibility": true,
            "benefit_modality": {
                "amount": 10,
                "max_discount_amount": 10000000,
                "short_description": "10% discount",
                "description": "The Westin Dhaka is Gulshan's premier five-star hotel. Visit us & enjoy a 10% discount at Splash, our famous poolside restaurant on the 5th floor, as well as our laundry/dry-cleaning services."
            },
            "address": "Gulshan-2, Dhaka",
            "socials": {
                "facebook": "https://www.facebook.com/The.Westin.Dhaka",
                "website": "http://the-westin-dhaka.dhaka-hotel.com/en/"
            },
            "benefit_type": "percentage",
            "location": {
                "lat": 23.7933244,
                "lon": 90.4123749,
                "map_address": "Gulshan-2, Dhaka"
            }
        },
        {
            "id": "600964a187cf50000153b0de",
            "title": "kacchi vai",
            "level": [
                "silver",
                "gold",
                "platinum"
            ],
            "status": "published",
            "city": [
                "dhaka"
            ],
            "partner_type": "food",
            "partner_mobile_number": "01199101010",
            "expires_at": {
                "seconds": 1637666849,
                "nanos": 538000000
            },
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1611226218583677449thumbnail_ccc823cd-8c05-4254-8dae-eec43e03f970.jpeg",
            "short_description": "Upto 20% off",
            "description": "Upto 5% for Silver, 10% for Gold, 20% for Platinum users",
            "created_by": "team sancus",
            "visibility": true,
            "benefit_modality": {
                "amount": 10,
                "max_discount_amount": 150,
                "short_description": "Gold 10%",
                "description": "Deatils...This modality only works for gold user"
            },
            "address": "Gulshan-1, Dhaka",
            "socials": {
                "facebook": "https://www.facebook.com/kacchivhai/",
                "twitter": "https://twitter.com/kacchivhai"
            },
            "benefit_type": "percentage",
            "location": {
                "lat": 23.7938,
                "lon": 90.4145,
                "map_address": "Road45, Gulshan-2"
            }
        }
    ],
    "cities": [
        {
            "name": "Dhaka",
            "slug": "dhaka"
        },
        {
            "name": "Chattogram",
            "slug": "chattogram"
        }
    ],
    "current_city": "dhaka"
}
```
### Get Benefit by QR

#### Url (Gateway)
```
http://api.p-stageenv.xyz/v1/sancus/marketplace/benefits/qr?partner_mobile_number={partner_mobile_number} 
```

#### Url (Internal)
```
/api/v1/marketplace/benefits/qr?partner_mobile_number={partner_mobile_number}  
```
#### Verb
```
GET
```

#### URI Parameters

| Parameters |  Type  | Description |
| ---------- | ------ | ----------- |
| partner_mobile_number  | Valid BD Phone number(11 digits) | Mobile number of the partner|

#### Headers(Gateway)

| Key |  Value  | Description |
| ---------- | ------ | ----------- |
| Authorization  | Bearer {{token}} | |
#### Headers (Internal)

| Key        | Value  | type | Description |
| ---------- | ------ | ---- | ----------- |
| id         | 4432   | int  |       user's legacy id |
| uuid  | "5c30835070496711585309"  | string | user's uuid|
| number  | "01853423423" | string | user's phone number
| city_id  | 1 | int  | user's city id|
| country_id  | 1  | int | user's country id|
#### Response Payload
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
    "id": "6020124b91edf3000170a811",
    "title": "Foreign Path",
    "level": [
        "bronze",
        "silver",
        "gold",
        "platinum"
    ],
    "status": "published",
    "city": [
        "dhaka"
    ],
    "partner_type": "Education",
    "partner_mobile_number": "01753021683",
    "expires_at": {
        "seconds": 1620410399,
        "nanos": 999000000
    },
    "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1615836816769311962thumbnail_432e7916-dfb7-4250-b918-2c6ae9642476.jpeg",
    "short_description": "Up-to 20% off",
    "description": "Foreign Path offers  IELTS training, foreign university admission counseling, and visa assistance. Visit their office to enjoy up-to a 20% discount, depending on your level! (T&C apply)",
    "created_by": "Imran",
    "visibility": true,
    "benefit_modality": {
        "bronze": {
            "amount": 5,
            "max_discount_amount": 10000000,
            "short_description": "5% discount",
            "description": "Foreign Path offers IELTS training, foreign university admissions counseling, and visa assistance. Visit their office to enjoy a 5% discount! (T&C apply)"
        },
        "gold": {
            "amount": 15,
            "max_discount_amount": 10000000,
            "short_description": "15% discount",
            "description": "Foreign Path offers IELTS training, foreign university admissions counseling, and visa assistance. Visit their office to enjoy a 15% discount! (T&C apply)"
        },
        "platinum": {
            "amount": 20,
            "max_discount_amount": 10000000,
            "short_description": "20% discount",
            "description": "Foreign Path offers IELTS training, foreign university admissions counseling, and visa assistance. Visit their office to enjoy a 20% discount! (T&C apply)"
        },
        "silver": {
            "amount": 10,
            "max_discount_amount": 10000000,
            "short_description": "10% discount",
            "description": "Foreign Path offers IELTS training, foreign university admissions counseling, and visa assistance. Visit their office to enjoy a 10% discount! (T&C apply)"
        }
    },
    "address": "Farmgate, Dhaka",
    "socials": {
        "facebook": "https://www.facebook.com/foreignpath"
    },
    "benefit_type": "percentage",
    "location": {
        "lat": 23.7545261,
        "lon": 90.3869943,
        "map_address": "RH Home Center; Suit no-312; Green Road; Dhaka. 1215 Dhaka, Dhaka Division, Bangladesh"
    }
}
```

### Avail Benefit

#### Url (Gateway)
```
http://api.p-stageenv.xyz/v1/sancus/marketplace/benefits/{benefit_id}/avail
```

#### Url (Internal)
```
/api/v1/marketplace/benefits/{benefit_id}/avail
```
#### Verb
```
POST
```
#### Headers(Gateway)

| Key |  Value  | Description |
| ---------- | ------ | ----------- |
| Authorization  | Bearer {{token}} | |
#### Headers (Internal)

| Key        | Value  | type | Description |
| ---------- | ------ | ---- | ----------- |
| id         | 4432   | int  |       user's legacy id |
| uuid  | "5c30835070496711585309"  | string | user's uuid|
| number  | "01853423423" | string | user's phone number
| city_id  | 1 | int  | user's city id|
| country_id  | 1  | int | user's country id|

#### URI Parameters

| Parameters |  Type  | Description |
| ---------- | ------ | ----------- |
| benefit_id  | N/A | benefit id of that benefit|

#### Request Payload

```json=
{
    "amount": 10000
}
```


| Key | Required |  Type  | Description |
| ---------- | -------- | ------ | ----------- |
| amount       |    ✔     | int64 | user's entered amount in paisa|




#### Response Payload
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
     "benefit_id": "6020124b91edf3000170a811",
     "user_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
     "amount": 10000,
     "discount": 2000,
     "discounted_amount": 8000,
     "message": "20% discount"
}
```

### List of Deals

#### Url (Gateway)
```
http://api.p-stageenv.xyz/v1/sancus/marketplace/deals
```

#### Url (Internal)
```
/api/v1/marketplace/deals
```
#### Verb
```
GET
```

#### Headers(Gateway)

| Key |  Value  | Description |
| ---------- | ------ | ----------- |
| Authorization  | Bearer {{token}} | |
#### Headers (Internal)

| Key        | Value  | type | Description |
| ---------- | ------ | ---- | ----------- |
| id         | 4432   | int  |       user's legacy id |
| uuid  | "5c30835070496711585309"  | string | user's uuid|
| number  | "01853423423" | string | user's phone number
| city_id  | 1 | int  | user's city id|
| country_id  | 1  | int | user's country id|
#### Response Payload
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
     {
    "Deals": [
        {
            "id": "5d468adacca70800016634d0",
            "title": "Silver bundle",
            "price": 70,
            "level": "silver",
            "expires_at": {
                "seconds": 1630454400
            },
            "rewards": [
                {
                    "id": "Loyal40",
                    "type": "rides"
                },
                {
                    "id": "SILVER",
                    "type": "food"
                }
            ],
            "thumbnail_url": "https://cdn.pathao.com/uploads/img/sancus/image-1615831973266876257thumbnail_fc6d0ee3-3cbd-4ab2-8914-c2961b50f3a1.png",
            "banner_url": "https://quicksilver-qa.pathaopay.xyz/images/sampleImage.jpeg",
            "short_description": "40% discount in Rides and 10% discount in Food",
            "description": "40% discount upto 25 taka for 2 Rides. 10% discount upto 50 taka for 1 Food order."
        }
    ]
}
}
```

### Purchase Deal

#### Url (Internal)
```
http://api.p-stageenv.xyz/v1/sancus/marketplace/deals/purchase
```

#### Url (Internal)
```
/api/v1/marketplace/deals/purchase
```
#### Verb
```
POST
```

#### Headers(Gateway)

| Key |  Value  | Description |
| ---------- | ------ | ----------- |
| Authorization  | Bearer {{token}} | |
#### Headers (Internal)

| Key        | Value  | type | Description |
| ---------- | ------ | ---- | ----------- |
| id         | 4432   | int  |       user's legacy id |
| uuid  | "5c30835070496711585309"  | string | user's uuid|
| number  | "01853423423" | string | user's phone number
| city_id  | 1 | int  | user's city id|
| country_id  | 1  | int | user's country id|
#### Request Payload
```json=
{
    "deal_id": "5d46a8c3eef3250001cc064d" // deal_id
}
```

#### Response Payload
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
    "user_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
    "deal_id": "5d46a8c3eef3250001cc064d",
    "status": "success"
}
```

### List of Transactions

#### Url (Gateway)
```
http://api.p-stageenv.xyz/v1/sancus/pocket/list-transactions
```

#### Url (Internal)
```
/api/v1/pocket/list-transactions
```
#### Verb
```
GET
```

#### Headers(Gateway)

| Key |  Value  | Description |
| ---------- | ------ | ----------- |
| Authorization  | Bearer {{token}} | |
#### Headers (Internal)

| Key        | Value  | type | Description |
| ---------- | ------ | ---- | ----------- |
| id         | 4432   | int  |       user's legacy id |
| uuid  | "5c30835070496711585309"  | string | user's uuid|
| number  | "01853423423" | string | user's phone number
| city_id  | 1 | int  | user's city id|
| country_id  | 1  | int | user's country id|

#### Response Payload
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
    "transactions": {
        "credit": [
            {
                "id": "9e2c4113-9706-4c59-b19c-5bb09d0f899e",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGL7",
                "reference_id": "43GGL7",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1611141056,
                    "nanos": 514722000
                },
                "issuer": "rides"
            },
            {
                "id": "da865781-ac92-4619-8638-c0f62d04d498",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGL2",
                "reference_id": "43GGL2",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1611139624,
                    "nanos": 209964000
                },
                "issuer": "rides"
            },
            {
                "id": "7670576a-906d-4589-a45d-f754c270dc29",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGKB",
                "reference_id": "43GGKB",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1611124401,
                    "nanos": 802304000
                },
                "issuer": "rides"
            },
            {
                "id": "98cc6889-57b2-4cbf-a2bd-8c80933333a3",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGKA",
                "reference_id": "43GGKA",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1611120175,
                    "nanos": 960229000
                },
                "issuer": "rides"
            },
            {
                "id": "4453d185-d174-4b75-b430-088a54f10e72",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGFL",
                "reference_id": "43GGFL",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610965340,
                    "nanos": 348250000
                },
                "issuer": "rides"
            },
            {
                "id": "6f47384f-76c4-4829-b855-aaa7de947d4f",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGFK",
                "reference_id": "43GGFK",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610963871,
                    "nanos": 244327000
                },
                "issuer": "rides"
            },
            {
                "id": "1e7c58db-f26a-4d61-8b4f-93ec1ffe1eb0",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGFJ",
                "reference_id": "43GGFJ",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610963068,
                    "nanos": 603035000
                },
                "issuer": "rides"
            },
            {
                "id": "ecaddfd1-e73c-45a0-8472-21ddf389a84c",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGFI",
                "reference_id": "43GGFI",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610962794,
                    "nanos": 352317000
                },
                "issuer": "rides"
            },
            {
                "id": "4d578750-aa82-416b-9519-8ed8def4dffb",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGFH",
                "reference_id": "43GGFH",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610962675,
                    "nanos": 946066000
                },
                "issuer": "rides"
            },
            {
                "id": "0501a5bb-cda9-42f9-ba35-3422d580a95f",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGFF",
                "reference_id": "43GGFF",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610962513,
                    "nanos": 504102000
                },
                "issuer": "rides"
            },
            {
                "id": "2095f657-9c38-46e2-a367-009976d1ff32",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGFE",
                "reference_id": "43GGFE",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610961366,
                    "nanos": 447614000
                },
                "issuer": "rides"
            },
            {
                "id": "5a51d8a0-b938-4b69-b3f7-465dea210312",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGFD",
                "reference_id": "43GGFD",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610961232,
                    "nanos": 859204000
                },
                "issuer": "rides"
            },
            {
                "id": "bbc1255a-0748-4e38-89e4-3812196641e2",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGF9",
                "reference_id": "43GGF9",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610953941,
                    "nanos": 551300000
                },
                "issuer": "rides"
            },
            {
                "id": "a0b7bd24-b4ea-4cfb-8ad1-4b5d8f572990",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGF7",
                "reference_id": "43GGF7",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610953505,
                    "nanos": 79395000
                },
                "issuer": "rides"
            },
            {
                "id": "36f7740a-59d5-45d2-b828-867368ae0867",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGF5",
                "reference_id": "43GGF5",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610952689,
                    "nanos": 164024000
                },
                "issuer": "rides"
            },
            {
                "id": "3458d315-03a8-4435-98ee-82bd3202ebaa",
                "pocket_id": "b4e2cb8e771f4ccda870ff8a1885e9c7",
                "points": 30,
                "note": "Points for Ride-ID: 43GGF4",
                "reference_id": "43GGF4",
                "type": "credit",
                "visibile": true,
                "created_at": {
                    "seconds": 1610952467,
                    "nanos": 331751000
                },
                "issuer": "rides"
            }
        ],
        "debit": []
    }
}
```

### Get FAQs

#### Url (Internal)
```
http://api.p-stageenv.xyz/v1/sancus/faqs
```

#### Url (Internal)
```
/api/v1/faqs
```
#### Verb
```
GET
```

#### Headers(Gateway)

| Key |  Value  | Description |
| ---------- | ------ | ----------- |
| Authorization  | Bearer {{token}} | |

#### Headers (Internal)

| Key        | Value  | type | Description |
| ---------- | ------ | ---- | ----------- |
| id         | 4432   | int  |       user's legacy id |
| uuid  | "5c30835070496711585309"  | string | user's uuid|
| number  | "01853423423" | string | user's phone number
| city_id  | 1 | int  | user's city id|
| country_id  | 1  | int | user's country id|
#### Response Payload
* #### On Success
    * Http Status Code: 200
    * Respose:
```json=
{
    "faqs": [
        {
            "question": "1. What is Pathao Points?",
            "answer": "Pathao Points allows you to earn points by taking our services and receive rewards based on your usage."
        },
        {
            "question": "2. How will I benefit as a Pathao Points user?",
            "answer": "As a Pathao Points user, you will receive rewards such as exciting Deal packages and Benefits. The more you use Pathao, the greater the benefits you will earn."
        },
        {
            "question": "3. How can I earn points?",
            "answer": "You can earn points by taking a ride or ordering food on our platform. You will be awarded 1 point for every 10 BDT you spend on our services."
        },
        {
            "question": "4. Can I earn points on promo rides?",
            "answer": "Yes, but you will be awarded points based on your discounted fare. If your fare was 120 BDT and you had a discount of 20 BDT, you would only earn points for 100 BDT."
        },
        {
            "question": "5. What can I redeem my points for?",
            "answer": "You can redeem your points for exciting rewards such as: Deals - Discounts on your Pathao rides and orders. Benefits - Discounts in our partner restaurants, shops, lounges, etc."
        },
        {
            "question": "6. How many points do I need to get to the next level?",
            "answer": "Pathao Points has 4 levels - Bronze (0 - 499), Silver (500 - 2999), Gold (3000 - 6999) and Platinum (7000+). You will be a Bronze user and have 0 points, to begin with. As soon as you earn enough points to get to the next level, your level status will change immediately."
        },
        {
            "question": "7. Can I avail of all the deals?",
            "answer": "You can only avail of a deal if you have enough points for it and if it falls in your current level."
        },
        {
            "question": "8. What is \"Available Points\"?",
            "answer": "Available Points are your net adjusted points (earned - spent) which shows how many points you currently have to redeem deals."
        },
        {
            "question": "9. I am a Platinum user and I don’t see any Platinum deals.",
            "answer": "All deals have validity. Please check the deals in your Pathao app from time to time to avoid missing out on your level offers."
        }
    ],
    "levels": [
        {
            "level": "bronze",
            "points": 0
        },
        {
            "level": "silver",
            "points": 500
        },
        {
            "level": "gold",
            "points": 3000
        },
        {
            "level": "platinum",
            "points": 7000
        }
    ]
}
```
---