Files
Global-Jain/resources/docs/1.0/relationship.md
2025-11-05 10:37:10 +05:30

8.2 KiB

API Docs

Relationship List

Details for relationship list api

####Endpoint

{warning} Please note that the URI for this endpoint should include api/{$version} before

| Method | URI | Headers | | : | :- | : | | GET | user/relationship-list | Bearer {Token} |

URL Params

None

Data Params

None

{success} Success Response

####Code 200 ####Content

{
    "data": [
        {
            "id": 1,
            "name": "Father",
            "status": 1,
            "created_at": "2022-02-10T08:43:05.000000Z",
            "updated_at": "2022-02-10T08:43:05.000000Z"
        },
        {
            "id": 2,
            "name": "Mother",
            "status": 1,
            "created_at": "2022-02-10T08:43:05.000000Z",
            "updated_at": "2022-02-10T08:43:05.000000Z"
        },
        {
            "id": 3,
            "name": "Brother",
            "status": 1,
            "created_at": "2022-02-10T08:43:05.000000Z",
            "updated_at": "2022-02-10T08:43:05.000000Z"
        },
        {
            "id": 4,
            "name": "Sister",
            "status": 1,
            "created_at": "2022-02-10T08:43:05.000000Z",
            "updated_at": "2022-02-10T08:43:05.000000Z"
        },
        {
            "id": 5,
            "name": "Grandfather",
            "status": 1,
            "created_at": "2022-02-10T08:43:05.000000Z",
            "updated_at": "2022-02-10T08:43:05.000000Z"
        },
        {
            "id": 6,
            "name": "Grandmother",
            "status": 1,
            "created_at": "2022-02-10T08:43:05.000000Z",
            "updated_at": "2022-02-10T08:43:05.000000Z"
        }
    ],
    "status": 200
}

{danger} Unauthenticated Response

####Code 403 ####Content

{
    "message": "Something went wrong!"
    "status": 403
}

Relationship Request List

Details for relationship request list api

####Endpoint

{warning} Please note that the URI for this endpoint should include api/{$version} before

| Method | URI | Headers | | : | :- | : | | GET | user/relation-request-list | Bearer {Token} |

URL Params

None

Data Params

None

{success} Success Response

####Code 200 ####Content

{
    "data": [
        {
            "id": 43,
            "from_id": 2,
            "to_id": 1,
            "relation_id": 3,
            "status": 0,
            "created_at": "2022-02-15T09:09:16.000000Z",
            "updated_at": "2022-02-15T09:09:47.000000Z",
            "sent_users": {
                "id": 1,
                "uuid": "d5ad39bc-44e8-4661-a4b7-ee6f9913c14d",
                "name": "Admin",
                "email": "admin@globaljain.com",
                "email_hash": "be382c3392bfb101cf67ebfe39eb398c",
                "username": "Admin",
                "country_code": null,
                "mobile": null,
                "dharma_id": null,
                "birth_date": null,
                "gender": 2,
                "email_verified_at": "2022-02-10T08:41:54.000000Z",
                "mobile_verified_at": "2022-02-10T08:41:54.000000Z",
                "avatar": "http://127.0.0.1:8000/images/misc/placeholder.png",
                "verification_confirmed": 2,
                "status": 2,
                "mobile_privacy": 1,
                "email_privacy": 1,
                "avatar_privacy": 1,
                "birth_date_privacy": 1,
                "gender_privacy": 1,
                "dharma_privacy": 1,
                "timezone": "",
                "last_login_at": null,
                "last_login_ip": "",
                "created_at": "2022-02-10T08:41:54.000000Z",
                "updated_at": "2022-02-10T08:41:54.000000Z",
                "deleted_at": null
            }
        }
    ],
    "status": 200
}

{danger} Unauthenticated Response

####Code 403 ####Content

{
    "message": "Something went wrong!"
    "status": 403
}

Sent Realtionship Request List

Details for sent relationship request list api

####Endpoint

{warning} Please note that the URI for this endpoint should include api/{$version} before

| Method | URI | Headers | | : | :- | : | | GET | user/sent-relation-request-list | Bearer {Token} |

URL Params

None

Data Params

None

{success} Success Response

####Code 200 ####Content

{
    "data": [
        {
            "id": 44,
            "from_id": 2,
            "to_id": 2,
            "relation_id": 4,
            "status": 0,
            "created_at": "2022-02-15T09:09:47.000000Z",
            "updated_at": "2022-02-15T09:09:47.000000Z",
            "sent_users": {
                "id": 2,
                "uuid": "1e2f763e-0d67-4cff-9aa1-242c81f4dd34",
                "name": "Test",
                "email": "test.jain@example.com",
                "email_hash": "0e61a0eb2db1efa1f3ed12ef717faaea",
                "username": "15",
                "country_code": null,
                "mobile": null,
                "dharma_id": 1,
                "birth_date": "1997-05-10",
                "gender": 1,
                "email_verified_at": null,
                "mobile_verified_at": null,
                "avatar": "http://127.0.0.1:8000/images/misc/placeholder.png",
                "verification_confirmed": 2,
                "status": 2,
                "mobile_privacy": 1,
                "email_privacy": 1,
                "avatar_privacy": 1,
                "birth_date_privacy": 1,
                "gender_privacy": 1,
                "dharma_privacy": 1,
                "timezone": null,
                "last_login_at": null,
                "last_login_ip": null,
                "created_at": "2022-02-10T09:43:06.000000Z",
                "updated_at": "2022-02-10T09:43:37.000000Z",
                "deleted_at": null
            }
        }
    ],
    "status": 200
}

{danger} Unauthenticated Response

####Code 403 ####Content

{
    "message": "Something went wrong!"
    "status": 403
}

Relationship Request Send

Details for send relation request api

####Endpoint

{warning} Please note that the URI for this endpoint should include api/{$version} before

| Method | URI | Headers | | : | :- | : | | POST | user/send-relation-request | Bearer {Token} |

URL Params

None

Data Params

{
    "to_id" : 1,
    "relation_id": 3
}

{success} Success Response

####Code 200 ####Content

{
    "message": "Relation request sent successfully.",
    "status": 200
}

{danger} Unauthenticated Response

####Code 403 ####Content

{
    "message": "Something went wrong!"
    "status": 403
}

Relationship Request Accept/Decline

Details for relation request accept/decline api

####Endpoint

{warning} Please note that the URI for this endpoint should include api/{$version} before

| Method | URI | Headers | | : | :- | : | | POST | user/accept-relation-request | Bearer {Token} |

URL Params

None

Data Params

{
    "from_id" : 2,
    "status": 1 // 1: Accept, 2: Decline
}

{success} Success Response

####Code 200 ####Content

{
    "message": "Relation request accepted successfully.",
    "status": 200
}

Relationship Request update

Details for relation request update api

####Endpoint

{warning} Please note that the URI for this endpoint should include api/{$version} before

| Method | URI | Headers | | : | :- | : | | POST | user/update-relation-request/{id} | Bearer {Token} |

URL Params

None

Data Params

{
    "relation" : "Name",
}

{success} Success Response

####Code 200 ####Content

{
    "message": "Relationship update successfully..",
    "status": 200
}

{danger} Unauthenticated Response

####Code 403 ####Content

{
    "message": "Something went wrong!"
    "status": 403
}