Affiliates

(ms.affiliates)

Affiliates



Fields

ValueDescription
title   
Type: string
Required
Title given to the affilate
key   
Type: string
Required
Unique code for the afiliate
affiliate_groups   
Type: array
logo   
Type: file
website   
Type: string
address   
Type: string
Address of the affiliate
city   
Type: string
City of the affiliate
country   
Type: string
Country of the affiliate
state   
Type: string
State of the affiliate
zip_code   
Type: string
Zip code of the affiliate
bank_details   
Type: object
account_holder_name
Type: string
account_number
Type: string
bank_name
Type: string
city
Type: string
branch
Type: string
ifsc_code
Type: string
pan   
Type: string
pan_proof   
Type: file
cin_number   
Type: string
tin   
Type: string
tin_proof   
Type: file
tan   
Type: string
tan_proof   
Type: file
gstin   
Type: string

Commands (Endpoints)

POST /api/1.1/entity/ms.affiliates   
Add a new user

Examples

Example to add a new user

Request
{
    "user": {
        "active": "1",
        "phone": "+919876543219",
        "first_name": "John",
        "last_name": "Ammy",
        "email": "Johnammy@gmail.com",
        "password": "Johnammy12",
        "verified": 1,
        "phone_verified": 1
    },
    "affiliate_groups": [],
    "country": "IN",
    "bank_details": {
        "account_holder_name": "Ammy",
        "account_number": "764512348912",
        "bank_name": "HDFC Pvt. Ltd",
        "city": "Gurgaon",
        "branch": "Sector 12",
        "ifsc_code": "HDFC-0000IY"
    },
    "title": "My affiliates",
    "key": "promotenumber21",
    "address": "383 South Garden",
    "city": "Gurgaon",
    "state": "Haryana",
    "zip_code": "122001"
}
Response
{
    "fileBaseUrl": "https://cdn.storehippo.com/s/57aaca10964eb5eb1362cb19/",
    "data": {
        "isBot": false,
        "device": {
            "app_info": null,
            "type": "desktop"
        },
        "storeVariants": {},
        "currency": "INR",
        "language": "HI",
        "isLoggedIn": true,
        "_id": "5e57a6af79b2b5203bbf433b",
        "first_name": "John",
        "email": "johnammy@gmail.com",
        "use_temporary_password": "0",
        "phone": "+919876543219",
        "role": "member",
        "current_role": "member",
        "available_roles": [
            "member",
            "affiliates"
        ],
        "active": "1",
        "verified": "0",
        "phone_verified": "0",
        "status": "approved",
        "cart_id": "5d764be493dc3d2f131aac0d",
        "last_name": "Ammy"
    }
}
DEL /api/1.1/entity/ms.affiliates/{resource_id}   
Delete an existing user

Examples

Example to delete an existing user

Request
{
}
Response
{
    "fileBaseUrl": "https://cdn.storehippo.com/s/57aaca10964eb5eb1362cb19/"
}
PUT /api/1.1/entity/ms.affiliates/{resource_id}   
Update an existing user

Examples

Example to update an existing user

Request
{
   "title": "Website Promoting",
    "key": "promotenumber21",
    "address": "383 South Garden",
    "city": "Gurgaon",
    "state": "Haryana",
    "zip_code": "122001"
}
Response
{
    "fileBaseUrl": "https://cdn.storehippo.com/s/57aaca10964eb5eb1362cb19/"
}
GET /api/1.1/entity/ms.affiliates/{resource_id}   
Get the specific affiliate user

Examples

Example to get the specific affiliate user

Request
Response
{
    "fileBaseUrl": "https://cdn.storehippo.com/s/57aaca10964eb5eb1362cb19/",
    "data": {
        "affiliate_groups": [],
        "country": "IN",
        "bank_details": {
            "account_holder_name": "Ammy",
            "account_number": "Jackson",
            "bank_name": "HDFC Pvt. Ltd",
            "city": "Gurgaon",
            "branch": "Sector 12",
            "ifsc_code": "HDFC-0000IY"
        },
        "title": "Website Promoting",
        "key": "promotenumber21",
        "address": "383 South Garden",
        "city": "Gurgaon",
        "state": "Haryana",
        "zip_code": "122001",
        "role": "affiliates",
        "balance": 200,
        "_id": "5e57a8fb79b2b5203bbf8cff",
        "user": {
            "_id": "5e57a8fb79b2b5203bbf8cff",
            "active": "1",
            "phone": "+919876543219",
            "first_name": "John",
            "last_name": "Ammy",
            "email": "johnammy@gmail.com",
            "password": "$2b$10$nYQJXTq7nnbfEJ7y8GShOuqpqg3wRyS4CH9I7aMtTejkQb3zqxvDi",
            "verified": "1",
            "phone_verified": "1",
            "roles": [
                "affiliates",
                "member"
            ],
            "child_entity_roles": [
                "affiliates"
            ],
            "verified_text": "5e57a8fb79b2b5203bbf8cfe",
            "mobile_otp": "825815",
            "verified_time": "1582803195984",
            "role": "member",
            "use_temporary_password": "0",
            "account": [],
            "client_details": {},
            "wallets": {},
            "seller_type": "all",
            "created_on": "2020-02-27T11:33:16.084Z",
            "_created_by": "530d7f8bc6b8283a11000003",
            "updated_on": "2020-02-27T11:42:53.837Z",
            "_updated_by": "5d3848415b82914d861ceb94"
        }
    },
    "messages": [
        {
            "name": "ms.entity.affiliates.get",
            "level": "success",
            "key": "ms.entity.affiliates.get"
        }
    ]
}
GET /api/1.1/entity/ms.affiliates   
List the number of users

Examples

Example to list the number of users

Request
Response
{
    "messages": [],
    "fileBaseUrl": "https://cdn.storehippo.com/s/57aaca10964eb5eb1362cb19/",
    "data": [
        {
            "affiliate_groups": [],
            "country": "IN",
            "bank_details": {
                "account_holder_name": "Ammy",
                "account_number": "Jackson",
                "bank_name": "HDFC Pvt. Ltd",
                "city": "Gurgaon",
                "branch": "Sector 12",
                "ifsc_code": "HDFC-0000IY"
            },
            "title": "Website Promoting",
            "key": "promotenumber21",
            "address": "383 South Garden",
            "city": "Gurgaon",
            "state": "Haryana",
            "zip_code": "122001",
            "role": "affiliates",
            "_id": "5e57a8fb79b2b5203bbf8cff",
            "user": {
                "_id": "5e57a8fb79b2b5203bbf8cff",
                "active": "1",
                "phone": "+919876543219",
                "first_name": "John",
                "last_name": "Ammy",
                "email": "johnammy@gmail.com",
                "password": "$2b$10$nYQJXTq7nnbfEJ7y8GShOuqpqg3wRyS4CH9I7aMtTejkQb3zqxvDi",
                "verified": "1",
                "phone_verified": "1",
                "roles": [
                    "affiliates",
                    "member"
                ],
                "child_entity_roles": [
                    "affiliates"
                ],
                "verified_text": "5e57a8fb79b2b5203bbf8cfe",
                "mobile_otp": "825815",
                "verified_time": "1582803195984",
                "role": "member",
                "use_temporary_password": "0",
                "account": [],
                "client_details": {},
                "wallets": {},
                "seller_type": "all",
                "created_on": "2020-02-27T11:33:16.084Z",
                "_created_by": "530d7f8bc6b8283a11000003",
                "updated_on": "2020-02-27T11:34:47.658Z"
            }
        },
        {
            "affiliate_groups": [],
            "country": "",
            "bank_details": {},
            "title": "new",
            "key": "new",
            "role": "affiliates",
            "_id": "5c11d491c9b06766f1bf76a4",
            "user": {
                "_id": "5c11d491c9b06766f1bf76a4",
                "first_name": "mukesh",
                "email": "sales@storehippo.com",
                "role": "superadmin",
                "active": "1",
                "password": "$2b$10$8vrT9lUr8EpxA/Lcc11KougbWXs1pCQopqIruhB6TaA.n1OP2E.Q6",
                "verified_text": "5c11d491c9b06766f1bf76a3",
                "mobile_otp": "104263",
                "verified_time": "1544672401437",
                "verified": "1",
                "phone_verified": "1",
                "use_temporary_password": "0",
                "account": [],
                "seller_type": "all",
                "created_on": "2018-12-13T03:40:01.549Z",
                "_created_by": "530d7f8bc6b8283a11000003",
                "updated_on": "2020-02-27T11:15:58.504Z",
                "_updated_by": "5d3848415b82914d861ceb94",
                "balance": -1814,
                "gender": "male",
                "phone": "+918010117117",
                "username": "mukesh",
                "child_entity_roles": [
                    "affiliates",
                    "seller"
                ],
                "roles": [
                    "seller",
                    "affiliates",
                    "superadmin"
                ],
                "cart_id": "5d764be493dc3d2f131aac0d"
            }
        }
    ],
    "paging": {
        "limit": 50,
        "start": 0,
        "count": 2,
        "total": 2
    }
}