Files
Global-Jain/resources/docs/1.0/relationship.md

417 lines
8.2 KiB
Markdown
Raw Normal View History

2025-11-05 10:37:10 +05:30
# API Docs
<a name="relationship-list"></a>
## 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
```php
None
```
### Data Params
```php
None
```
> {success} Success Response
####Code `200`
####Content
```php
{
"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
```php
{
"message": "Something went wrong!"
"status": 403
}
```
<a name="list"></a>
## 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
```php
None
```
### Data Params
```php
None
```
> {success} Success Response
####Code `200`
####Content
```php
{
"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
```php
{
"message": "Something went wrong!"
"status": 403
}
```
<a name="sent-list"></a>
## 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
```php
None
```
### Data Params
```php
None
```
> {success} Success Response
####Code `200`
####Content
```php
{
"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
```php
{
"message": "Something went wrong!"
"status": 403
}
```
<a name="send-request"></a>
## 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
```php
None
```
### Data Params
```php
{
"to_id" : 1,
"relation_id": 3
}
```
> {success} Success Response
####Code `200`
####Content
```php
{
"message": "Relation request sent successfully.",
"status": 200
}
```
> {danger} Unauthenticated Response
####Code `403`
####Content
```php
{
"message": "Something went wrong!"
"status": 403
}
```
<a name="accept-request"></a>
## 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
```php
None
```
### Data Params
```php
{
"from_id" : 2,
"status": 1 // 1: Accept, 2: Decline
}
```
> {success} Success Response
####Code `200`
####Content
```php
{
"message": "Relation request accepted successfully.",
"status": 200
}
```
<a name="update-request"></a>
## 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
```php
None
```
### Data Params
```php
{
"relation" : "Name",
}
```
> {success} Success Response
####Code `200`
####Content
```php
{
"message": "Relationship update successfully..",
"status": 200
}
```
> {danger} Unauthenticated Response
####Code `403`
####Content
```php
{
"message": "Something went wrong!"
"status": 403
}
```