Skip to content

Instantly share code, notes, and snippets.

@andrisasuke
Created October 2, 2018 07:04
Show Gist options
  • Save andrisasuke/b120fe71ef63379f5fe313f3febf0b99 to your computer and use it in GitHub Desktop.
Save andrisasuke/b120fe71ef63379f5fe313f3febf0b99 to your computer and use it in GitHub Desktop.
FORMAT: 1A
HOST: http://gibby.stagingapps.net/api
# Gibby API
The Gibby API provides endpoints for external users
## Glossary
- API Key: API Key are random strings that give consumer access to the APIS
- Access Token: Access tokens are random strings that give a user access to the APIs.
## API Authentication
Each consumer of the Supply API is given n unique API_KEY, which should be included in all calls to the API.
In addition, for each API call consumer must also provide an ACCESS_TOKEN, the ACCESS_TOKEN will given from the login endpoint.
## API Requests/Responses
API_KEY and ACCESS_TOKEN must be present in all API calls (except the `/login` and `/register` endpoint for API_KEY validation).
Example request using CURL:
```
curl -i http://gibby.stagingapps.net/api/countries?api_key=API_KEY \
-H "Authorization: Bearer ACCESS_TOKEN"
```
The Supply API accepts json requests and serves json responses. All requests should include a content-type header set as application/json. All POST requests with data, should be made with valid json in the body of the POST
#### Possible HTTP Responses:
| Status | Description |
|--------|-----------------------------|
| 200 | GET Request was successful |
| 201 | POST request was successful |
## API Errors
| Status Code | Description |
|-------------|-----------------------------------------------------------------------------|
| 400 | Bad Request |
| 401 | Unauthorized: Either the API_KEY or the ACCESS_TOKEN are incorrect |
| 403 | Forbidden |
| 404 | Resource not found |
| 503 | The server is down or not responding, try again later |
| 500 | The server encountered an errror |
An example json error response is shown below;
```
{
"error":
{
"http_code": 400,
"message": "Bad Request"
}
}
```
## Paginated collections
Collections of resources are always paginated. This means that the response contains links to the collection spread over a number of pages, for example:
```
{
"data":
[
{...},
{...}
],
"meta":
{
"pagination":
{
"total": 246,
"count": 10,
"per_page": 10,
"current_page": 2,
"total_pages": 25,
"links":
{
"previous": "http://gibby.stagingapps.net/api/countries?api_key=198bc4240396814a3c8fb73b52b451b0&page=1",
"next": "http://gibby.stagingapps.net/api/countries?api_key=198bc4240396814a3c8fb73b52b451b0&page=3"
}
}
}
}
```
This response represents the second page of a list of properties for a host. The `previous` and `next` indicate API urls you can call to navigate through the collection. The data attribute contains the actual collection for the current page.
Use these paging links (or the `page` param) to move through pages of collection. If no items exist in the collection, the data attribute will be an empty array.
The number of results per page can be modified with an optional `per_page` param. If no per_page is specified, 30 elements are returned on each page.
NOTE: The maximum `per_page` parameter for any collection endpoint is 30.
## Authentication [/login?api_key={api_key}]
The Gibby API requires authentication -
specifically requests made on behalf of a user.
Authenticated requests require an `access_token`.
These tokens are unique to a user and should be stored securely.
In order to receive an access_token, you must login using the correct credentials.
__Note__
A user can login via API if their account has been activated via email verification link
### Login [POST]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Attributes
+ username (string) - username
+ password (string) - password
+ Request (application/json)
{
"username": "username",
"password": "rahasia"
}
+ Response 200 (application/json)
{
"data":
{
"id": 1,
"email": "email@gibby.stagingapps.net",
"username": "username",
"access_token": "IwuUO3aeLT6mxCn8a2MM74egljZfN74l"
}
}
+ Response 400 (application/json)
{
"error":
{
"http_code": 400,
"message": "Bad Request"
}
}
+ Response 401 (application/json)
{
"error":
{
"http_code": 401,
"message": "Invalid credentials"
}
}
+ Response 403 (application/json)
{
"error":
{
"http_code": 403,
"message": "Please check your email to activate your account"
}
}
+ Response 403 (application/json)
{
"error":
{
"http_code": 403,
"message": "Your account has been deactivated. Please kindly contact Gibby administrator for further details."
}
}
## Registration [/register?api_key={api_key}]
Use this endpoint to register a new user.
__Note__
After registration process, user should receive a verification link to their email.
a user should activate their account first to continue accessing another endpoint.
After activated their account, user should complete their profile via `Update User Profile` endpoint.
So he will able to POST trip and POST Request through the API.
### Register [POST]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"email": "email@gibby.stagingapps.net",
"password": "rahasia",
"username": "apalahini"
}
+ Response 201 (application/json)
{
"data":
{
"http_code": 201,
"message": "Please check your email to activate your account"
}
}
+ Response 422 (application/json)
{
"error":
{
"http_code": 422,
"message": "The email has already been taken."
}
}
## Resend Verification Email [/verification/resend?api_key={api_key}]
Use this endpoint to resend a verification email
### Resend Verification Email [POST]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"email": "email@gibby.stagingapps.net"
}
+ Response 200 (application/json)
{
"data":
{
"http_code": 200,
"message": "We have e-mailed your verification link!"
}
}
+ Response 422 (application/json)
{
"error":
{
"http_code": 422,
"message": "Email not found"
}
}
## Forgot Password [/password/reset?api_key={api_key}]
Use this endpoint to receive reset password instruction via email
### Reset Password [POST]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"email": "email@gibby.stagingapps.net"
}
+ Response 200 (application/json)
{
"data":
{
"http_code": 200,
"message": "We have e-mailed your reset password link!"
}
}
+ Response 422 (application/json)
{
"error":
{
"http_code": 422,
"message": "Email not found"
}
}
## Facebook Registration [/facebook?api_key={api_key}]
Use this endpoint to register a new facebook user.
### Facebook Register [POST]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"email": "email@gibby.stagingapps.net",
"provider_user_id": "facebook_id",
"avatar": "https://graph.facebook.com/v2.6/xxxxxx/picture?type=normal",
"name": "Facebook Name"
}
+ Response 200 (application/json)
{
"data":
{
"id": 1,
"username": null,
"email": "email@gibby.stagingapps.net",
"access_token": "IwuUO3aeLT6mxCn8a2MM74egljZfN74l"
}
}
+ Response 422 (application/json)
{
"error":
{
"http_code": 422,
"message": "The provider_user_id has already been taken."
}
}
## Countries [/countries?api_key={api_key}&search={search}]
This endpoint lists all countries. The countries collection is paginated and always ordered by creation date
### List All Countries [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ search (string, optional) - Search keyword
+ Response 200 (application/json)
{
"data":
[
{
"id": 101,
"name": "Indonesia",
"contry_image": {
"original": "http://gibby.stagingapps.net/uploads/countries/101/1473121607705570364.jpg",
"normal": "http://gibby.stagingapps.net/uploads/countries/101/1473121607705570364_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/countries/101/1473121607705570364_small.jpg"
},
"open_requests": 3,
"pending_requests": 0,
"completed_requests": 3,
"traveller": 15,
"earliest_return_date": "2016-09-14",
"created_at": "2016-09-05 14:47:38",
"updated_at": "2016-09-06 07:26:47"
},
{
"id": 110,
"name": "Japan",
"contry_image": {
"original": "http://gibby.stagingapps.net/uploads/countries/110/14730665581213856231.jpg",
"normal": "http://gibby.stagingapps.net/uploads/countries/110/14730665581213856231_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/countries/110/14730665581213856231_small.jpg"
},
"open_requests": 4,
"pending_requests": 0,
"completed_requests": 1,
"traveller": 4,
"earliest_return_date": "2016-09-14",
"created_at": "2016-09-05 14:47:39",
"updated_at": "2016-09-05 16:09:18"
},
],
"meta":
{
"pagination":
{
"total": 246,
"count": 10,
"per_page": 10,
"current_page": 2,
"total_pages": 25,
"links":
{
"previous": "http://gibby.stagingapps.net/api/countries?api_key=198bc4240396814a3c8fb73b52b451b0&page=1",
"next": "http://gibby.stagingapps.net/api/countries?api_key=198bc4240396814a3c8fb73b52b451b0&page=3"
}
}
}
}
## Cities [/cities?api_key={api_key}&search={search}&country_id={country_id}]
This endpoint lists all cities. The cities collection is paginated and always ordered by creation date
### List All Cities [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ `country_id` (integer, optional) - Search based on country_id
+ search (string, optional) - Search keyword
+ Response 200 (application/json)
{
"data":
[
{
"id": 14,
"name": "Bandung",
"created_at": "2016-09-05 14:58:06",
"updated_at": "2016-09-05 14:58:06"
},
{
"id": 15,
"name": "Jakarta",
"created_at": "2016-09-05 14:58:06",
"updated_at": "2016-09-05 14:58:06"
}
],
"meta":
{
"pagination":
{
"total": 246,
"count": 10,
"per_page": 10,
"current_page": 2,
"total_pages": 25,
"links":
{
"previous": "http://gibby.stagingapps.net/api/cities?api_key=198bc4240396814a3c8fb73b52b451b0&page=1",
"next": "http://gibby.stagingapps.net/api/cities?api_key=198bc4240396814a3c8fb73b52b451b0&page=3"
}
}
}
}
## Collection Method [/collection-methods?api_key={api_key}&name={name}]
This endpoint lists all collection methods.
### List All Collection Method [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ name (string, optional) - Search based on collection method name
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"name": "Meet Up",
"is_courier": false,
"is_any": false,
"created_at": "2016-09-05 14:51:51",
"updated_at": "2016-09-05 14:51:51"
},
{
"id": 2,
"name": "JNE/POS",
"is_courier": true,
"is_any": false,
"created_at": "2016-09-05 14:51:51",
"updated_at": "2016-09-05 14:51:51"
},
{
"id": 3,
"name": "Gojek",
"is_courier": false,
"is_any": false,
"created_at": "2016-09-05 14:51:51",
"updated_at": "2016-09-05 14:51:51"
},
{
"id": 4,
"name": "Any of the above",
"is_courier": false,
"is_any": true,
"created_at": "2016-09-05 14:51:52",
"updated_at": "2016-09-05 14:51:52"
}
],
"meta": {
"pagination": {
"total": 4,
"count": 4,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Couriers [/couriers?api_key={api_key}]
This endpoint lists all Couriers.
### List All Couriers [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"name": "JNE",
"phone": "+62 21 29278888",
"web_url": "http://www.jne.co.id/",
"created_at": "2016-09-05 15:56:28",
"updated_at": "2016-09-05 15:56:28"
},
{
"id": 2,
"name": "Pos Indonesia Domestic",
"phone": "+62 21 161",
"web_url": "http://www.posindonesia.co.id",
"created_at": "2016-09-05 15:56:28",
"updated_at": "2016-09-05 15:56:28"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## User Profile [/user/profile?api_key={api_key}]
### User Profile [GET]
Returns current user profile information.
#### Photos
These fields will contain the resized "normal" variant of the user's uploaded image. This "normal" variant is typically 48px by 48px.
By modifying the URL, you can retrieve other variant sizings such as
"bigger", "mini", and "original".
Consult the table below for more examples:
| Variant | Dimensions | Example URL |
|----------|--------------|------------------------------------------------------------------------------|
| normal | 48px by 48px | http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_normal.jpg |
| bigger | 73px by 73px | http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_bigger.jpg |
| mini | 24px by 24px | http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_mini.jpg |
| original | original | http://gibby.stagingapps.net/uploads/users/1/14666660911234851770.jpg |
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"id": 2,
"email": "alfa2159@gmail.com",
"username": "alfa6661",
"name": "Alfa Adhitya",
"gender": "Men",
"address": "Bandung",
"country_id": 1,
"country": "Indonesia",
"city_id": 1,
"city": "Bandung",
"date_of_birth": "1991-05-04",
"phone": "+6285722956661",
"photos": {
"original": "http://gibby.stagingapps.net/uploads/users/2/14730626371963590262.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/2/14730626371963590262_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/2/14730626371963590262_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/2/14730626371963590262_mini.jpg"
},
"about_me": "",
"trips": 1,
"requests": 1,
"followers": 2,
"following": 1,
"zipcode": 12345,
"created_at": "2016-09-05 14:53:07",
"updated_at": "2016-09-13 09:19:32",
"referral_code": "KRULNLEXQL",
"credit": "1600000.00",
"access_token": "wIoyBiwa9lcMsImzyYB510wUUtkua78g"
}
}
### Update User Profile [POST]
Use this endpoint to update user's profile
#### Gender:
1 = Men
2 = Women
#### Country:
You can get the list of country ids from countries endpoint.
#### Cities:
You can get the list of city ids from cities endpoint.
#### Cropping Image
send form-data `cropped_opt` string value with format "width,height,x,y"
+ Headers
Accept: application/json
Content-Type: multipart/form-data; boundary=---BOUNDARY
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (multipart/form-data; boundary=---BOUNDARY)
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="email"
admin@domain.com
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="name"
admin
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="username"
admin
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="address"
Bandung
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="gender"
1
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="date_of_birth"
1990-05-04
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="country_id"
1
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="city_id"
1
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="phone"
+6285722956661
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="photo"; filename=""
Content-Type:
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="cropped_opt"
100,100,12,15
+ Response 200 (application/json)
{
"data": {
"id": 2,
"email": "alfa2159@gmail.com",
"username": "alfa6661",
"name": "Alfa Adhitya",
"gender": "Men",
"address": "Bandung",
"country_id": 1,
"country": "Indonesia",
"city_id": 1,
"city": "Bandung",
"date_of_birth": "1991-05-04",
"phone": "+6285722956661",
"photos": {
"original": "http://gibby.stagingapps.net/uploads/users/2/14730626371963590262.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/2/14730626371963590262_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/2/14730626371963590262_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/2/14730626371963590262_mini.jpg"
},
"about_me": "",
"trips": 1,
"requests": 1,
"followers": 2,
"following": 1,
"zipcode": 12345,
"created_at": "2016-09-05 14:53:07",
"updated_at": "2016-09-13 09:19:32",
"referral_code": "KRULNLEXQL",
"credit": "1600000.00",
"access_token": "wIoyBiwa9lcMsImzyYB510wUUtkua78g"
}
}
## Unpaid Request [/user/unpaid-requests?api_key={api_key}]
### User Unpaid Request [GET]
Use this endpoint to get all unpaid request from users
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 8,
"item": "Walnuts",
"price_to_pay": 36000,
"images": [
{
"original": "http://gibby.stagingapps.net/uploads/requests/8/14732139791436211113.png",
"normal": "http://gibby.stagingapps.net/uploads/requests/8/14732139791436211113_normal.png",
"small": "http://gibby.stagingapps.net/uploads/requests/8/14732139791436211113_small.png",
"mini": "http://gibby.stagingapps.net/uploads/requests/8/14732139791436211113_mini.png",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/8/14732139791436211113_thumbnail.png"
},
{
"original": "http://gibby.stagingapps.net/uploads/requests/8/14732139791255792154.jpg",
"normal": "http://gibby.stagingapps.net/uploads/requests/8/14732139791255792154_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/requests/8/14732139791255792154_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/requests/8/14732139791255792154_mini.jpg",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/8/14732139791255792154_thumbnail.jpg"
}
]
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Trips [/trips?api_key={api_key}{&user_id}]
### POST Trips [POST]
Use this endpoint to post a new trip.
#### Destination
The country_id in destination attributes should be unique.
The city_ids in destination attributes should be the list of city_id that associated with the country_id above.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ from_country_id (number) - The ID of country
+ from_city_id (number) - The ID of city
+ departure_date (string) - departure date
+ return_date (string) - return date
+ destination (array)
+ (object)
+ country_id (number) - The ID of destination country
+ city_ids (array) - Array list of destination cities
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"from_country_id": "1",
"from_city_id": "3",
"return_date": "2017-01-01",
"destination": [
{
"country_id":1,
"city_ids":[1,2]
},
{
"country_id":2,
"city_ids":[3,4]
}
]
}
+ Response 200 (application/json)
{
"data": {
"id": 125,
"from_country_id": 1,
"from_country": "Afghanistan",
"from_city_id": 1,
"from_city": "aaa",
"departure_date": "2016-11-01",
"return_date": "2016-11-02",
"destination": [
{
"id": 1,
"country_id": 101,
"country": "Indonesia",
"cities": [
{
"id": 1,
"city_id": 2,
"city": "Jakarta"
},
{
"id": 2,
"city_id": 3,
"city": "Bandung"
}
]
}
]
}
}
+ Response 422 (application/json)
{
"error":
{
"http_code": 422,
"message": "The departure_date field is required.|Some of destination values is invalid"
}
}
### GET Trips [GET]
This endpoint lists all trips. The trips collection is paginated
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ user_id (integer, optional) - User ID
+ Response 200 (application/json)
{
"data": [
{
"id": 153,
"from_country_id": 1,
"from_country": "Afghanistan",
"image": {
"original": "http://gibby.stagingapps.net/uploads/countries/101/1478058588870132856.jpg",
"normal": "http://gibby.stagingapps.net/uploads/countries/101/1478058588870132856_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/countries/101/1478058588870132856_small.jpg"
},
"from_city_id": 1,
"from_city": "aaa",
"departure_date": "2016-11-01",
"return_date": "2016-11-02",
"destination": [
{
"id": 155,
"country_id": 1,
"country": "Afghanistan",
"image": {
"original": "http://gibby.stagingapps.net/uploads/countries/110/14784869591197070399.jpg",
"normal": "http://gibby.stagingapps.net/uploads/countries/110/14784869591197070399_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/countries/110/14784869591197070399_small.jpg"
},
"request_pending": 1,
"request_completed": 0,
"cities": [
{
"id": 197,
"city_id": 1,
"city": "aaa"
}
]
},
{
"id": 156,
"country_id": 101,
"country": "Indonesia",
"image": {
"original": "http://gibby.stagingapps.net/uploads/countries/110/14784869591197070399.jpg",
"normal": "http://gibby.stagingapps.net/uploads/countries/110/14784869591197070399_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/countries/110/14784869591197070399_small.jpg"
},
"request_pending": 1,
"request_completed": 1,
"cities": [
{
"id": 198,
"city_id": 2,
"city": "Jakarta"
}
]
}
]
}
],
"meta": {
"pagination": {
"total": 6,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Trip Details [/trips/{id}?api_key={api_key}{&user_id}]
### Get Trip Detail [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (number, required) - Trip ID
+ user_id (integer, optional) - User ID
+ Response 200 (application/json)
{
"data": {
"id": 153,
"from_country_id": 1,
"from_country": "Afghanistan",
"from_city_id": 1,
"from_city": "aaa",
"departure_date": "2016-11-01",
"return_date": "2016-11-02",
"destination": [
{
"id": 156,
"country_id": 101,
"country": "Indonesia",
"cities": [
{
"id": 198,
"city_id": 2,
"city": "Jakarta"
}
]
}
]
}
}
## Categories [/categories?api_key={api_key}&search={search}]
This endpoint lists all categories. The categories collection is paginated and always ordered by creation date
### List All Categories [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ search (string, optional) - Search keyword
+ Response 200 (application/json)
{
"data":
[
{
"id": 1,
"name": "Duty Free Items",
"customs": true,
"created_at": "2016-09-05 14:47:41",
"updated_at": "2016-09-05 14:47:41"
}
],
"meta":
{
"pagination":
{
"total": 246,
"count": 10,
"per_page": 10,
"current_page": 2,
"total_pages": 25,
"links":
{
"previous": "http://gibby.stagingapps.net/api/categories?api_key=198bc4240396814a3c8fb73b52b451b0&page=1",
"next": "http://gibby.stagingapps.net/api/categories?api_key=198bc4240396814a3c8fb73b52b451b0&page=3"
}
}
}
}
## Requests [/requests?api_key={api_key}{&item_name}{&category_id}{&user_id}{&include}]
This endpoint lists all requests. The requests collection is paginated and always ordered by creation date
`price_to_pay` attribute is total price that the requester should be pay to gibby.
`price_to_pay` = `price` + `service_fee`
`has_offer` attribute indicate whether request has an offer or not. return boolean.
`has_accepted_offer` attribute indicate whether request has accepted a traveller or not. return boolean.
`accepted_offer` attribute accepted offer id. return null if requester doesn't have accepted offer.
`sort` = concat field attribute + type order
available option =
- `created_at.desc`
- `item_name.asc`
- `maximum_price.asc`
- `maximum_price.desc`
`status` available options
| Status | Value |
|--------------------|-------|
| Open | 0 |
| Accept / Pending | 2 |
| Completed | 3 |
### List All Requests [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ item_name (string, optional) - Search keyword
+ category_id (integer, optional) - Search category
+ user_id (integer, optional) - Search by user id
+ sort (string, optional) - sort by attribute
+ status (integer, optional) - sort by status id
+ include (string, optional) - include resource on API response. available value comments.
+ Response 200 (application/json)
{
"data": [
{
"id": 132,
"item_name": "Bake",
"category_id": 2,
"category": "Food & Drinks",
"country_id": 1,
"country": "Afghanistan",
"city_id": null,
"city": null,
"price_to_pay": 1065000,
"price": 1000000,
"service_fee": 65000,
"brand": "Bake",
"quantity": "1 pcs",
"color_flavour": "",
"size": "",
"original_box": true,
"original_receipt": true,
"status": "Pending Deposit",
"images": [
{
"original": "http://gibby.stagingapps.net/uploads/requests/100/1481009580966240335.jpg"
}
],
"collection_method_id": 4,
"collection_method": "Any of the above",
"maximum_delivery_date": "2017-02-04",
"delivery_country_to": 101,
"delivery_country": "Indonesia",
"delivery_city_to": 1,
"delivery_city": "Bandung",
"delivery_address": "For Meet up\r\nPlease arrange with traveller\r\nFor Delivery via JNE/POS/GOJEK item will be delivered to your address\r\n Jl. Ters. Jkt No.53, Cicaheum, Kiaracondong, Kota Bandung, Jawa Barat 40291",
"shop_address": "",
"note": "",
"user": {
"id": 36,
"user": "teguh2016",
"name": "Teguh Marga",
"images": {
"original": "http://gibby.stagingapps.net/uploads/users/36/14816881231283591640.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/36/14816881231283591640_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/36/14816881231283591640_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/36/14816881231283591640_mini.jpg"
},
"rating": "5.00"
},
"has_offer": true,
"has_accepted_offer": true,
"count_user_offer": 1,
"accepted_offer": 64,
"is_owner": false,
"isCancel": false,
"canComment": true,
"created_at": "2016-12-14 16:42:44",
"updated_at": "2016-12-14 16:43:42",
"comment_count": 0,
"can_offer": false,
"cant_type": false,
"traveller": {
"id": 46,
"user": "dinar12",
"name": "Dinar Tiarninda",
"image": {
"original": "http://gibby.stagingapps.net/uploads/users/46/148168753885769913.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/46/148168753885769913_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/46/148168753885769913_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/46/148168753885769913_mini.jpg"
},
"rating": "5.00"
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
### Post Requests [POST]
#### Collection Method:
1 = Meet Up
2 = JNE/POS
3 = Gojek
4 = Any of the above
#### Cropping Image
send form-data `cropped_opt[]` string value with format "width,height,x,y"
+ Headers
Accept: application/json
Content-Type: multipart/form-data; boundary=---BOUNDARY
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (multipart/form-data; boundary=---BOUNDARY)
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="item_name"
Indomie Goreng
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="item_description"
Indomie goreng jumbo
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="category_id"
1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="brand"
Test
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="quantity"
1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="original_box"
1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="original_receipt"
1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image[]"; filename=""
Content-Type:
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="cropped_opt[]"
100,100,1,1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image[]"; filename=""
Content-Type:
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="cropped_opt[]"
100,100,1,1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="country_id"
1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="maximum_price"
20000
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="collection_method"
1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="delivery_country_to"
101
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="delivery_city_to"
1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="delivery_address"
Jln. Pangalengan no 368
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="shop_address"
Jln. Pahlawan no 48
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="note"
Note to traveller
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="estimate_delivery"
2016-10-10
------WebKitFormBoundary7MA4YWxkTrZu0gW--
+ Response 200 (application/json)
{
"data": {
"id": 1,
"item_name": "Adidas Issey Miyake backpack",
"category_id": 10,
"category": "Men's Fashion & Accessories",
"country_id": 110,
"country": "Japan",
"city_id": null,
"city": null,
"price": 1500000,
"brand": "Adidas",
"quantity": "1",
"color_flavour": "Black",
"size": "",
"original_box": true,
"original_receipt": true,
"status": "Open",
"images": [
{
"original": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419.jpg",
"normal": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419_mini.jpg",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419_thumbnail.jpg"
}
],
"collection_method_id": 4,
"collection_method": "Any of the above",
"maximum_delivery_date": "2016-09-29",
"delivery_country_to": 101,
"delivery_county": "Indonesia",
"delivery_city_to": 1,
"delivery_city": "Bandung",
"delivery_address": "Jl. Cikutra Barat No.66, Sukaluyu, Kec. Cibeunying Kaler, Jawa Barat 40123",
"shop_address": "DiverCity Tokyo Plaza, 1 Chome-1-10 Aomi, Koto, Tokyo 135-0064, Jepan",
"note": "1200 Yen \r\n",
"user": {
"id": 3,
"name": "Suci Fadz",
"images": {
"original": "http://gibby.stagingapps.net/images/default.jpg",
"normal": "http://gibby.stagingapps.net/images/default.jpg",
"small": "http://gibby.stagingapps.net/images/default.jpg",
"mini": "http://gibby.stagingapps.net/images/default.jpg"
}
},
"has_offer": false,
"has_accepted_offer": false,
"accepted_offer": null,
"is_owner": false,
"created_at": "2016-09-05 15:09:49",
"updated_at": "2016-09-05 15:09:49",
"comment_count": 0
}
}
## Requests Detail [/requests/{id}?trip={trip_id}&api_key={api_key}]
`price_to_pay` attribute is total price that the requester should be pay to gibby.
`price_to_pay` = `price` + `service_fee`
`can_offer` indicates whether the current user can offer this request
`cant_type` indicates why traveller cant offer requests. the type can filled by
1 = User has trip but return date more than maximal delivery.
2 = User has trip but current date more than return date.
### Detail Requests [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Request id
+ trip_id (integer, optional) - Required if type notification = 15
+ Response 200 (application/json)
{
"data": {
"id": 1,
"item_name": "Adidas Issey Miyake backpack",
"category_id": 10,
"category": "Men's Fashion & Accessories",
"country_id": 110,
"country": "Japan",
"city_id": null,
"city": null,
"price": 1500000,
"brand": "Adidas",
"quantity": "1",
"color_flavour": "Black",
"size": "",
"original_box": true,
"original_receipt": true,
"status": "Open",
"images": [
{
"original": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419.jpg",
"normal": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419_mini.jpg",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/1/14730629891139507419_thumbnail.jpg"
}
],
"collection_method_id": 4,
"collection_method": "Any of the above",
"maximum_delivery_date": "2016-09-29",
"delivery_country_to": 101,
"delivery_county": "Indonesia",
"delivery_city_to": 1,
"delivery_city": "Bandung",
"delivery_address": "Jl. Cikutra Barat No.66, Sukaluyu, Kec. Cibeunying Kaler, Jawa Barat 40123",
"shop_address": "DiverCity Tokyo Plaza, 1 Chome-1-10 Aomi, Koto, Tokyo 135-0064, Jepan",
"note": "1200 Yen \r\n",
"user": {
"id": 3,
"name": "Suci Fadz",
"images": {
"original": "http://gibby.stagingapps.net/images/default.jpg",
"normal": "http://gibby.stagingapps.net/images/default.jpg",
"small": "http://gibby.stagingapps.net/images/default.jpg",
"mini": "http://gibby.stagingapps.net/images/default.jpg"
}
},
"has_offer": true,
"has_accepted_offer": false,
"has_declined_offer": true,
"accepted_offer": null,
"is_owner": false,
"created_at": "2016-09-05 15:09:49",
"updated_at": "2016-09-05 15:09:49",
"comment_count": 0,
"can_offer": false,
"cant_type": 1,
"cant_type_string": "Your return date exceeds maximum return date set by requester"
}
}
## Trending Requests [/requests/trendings?api_key={api_key}]
### Trending Requests [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"item_name": "Walnuts",
"category_id": 2,
"category": "Food & Drinks",
"country_id": 1,
"country": "Afghanistan",
"city_id": null,
"city": null,
"price": 50000,
"brand": "Plant Kernels",
"quantity": "25",
"color_flavour": "",
"size": "",
"original_box": true,
"original_receipt": true,
"status": "Canceled",
"images": [
{
"original": "http://gibby.stagingapps.net/uploads/requests/1/14739072711027348449.jpg",
"normal": "http://gibby.stagingapps.net/uploads/requests/1/14739072711027348449_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/requests/1/14739072711027348449_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/requests/1/14739072711027348449_mini.jpg",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/1/14739072711027348449_thumbnail.jpg"
}
],
"collection_method_id": 1,
"collection_method": "Meet Up",
"maximum_delivery_date": "2016-09-30",
"delivery_country_to": 101,
"delivery_county": "Indonesia",
"delivery_city_to": 1,
"delivery_city": "Bandung",
"delivery_address": "Dimana aja.",
"shop_address": "",
"note": "",
"user": {
"id": 3,
"name": "Gibster",
"images": {
"original": "http://gibby.stagingapps.net/images/default.jpg",
"normal": "http://gibby.stagingapps.net/images/default.jpg",
"small": "http://gibby.stagingapps.net/images/default.jpg",
"mini": "http://gibby.stagingapps.net/images/default.jpg"
}
},
"has_offer": true,
"has_accepted_offer": true,
"accepted_offer": 1,
"is_owner": false,
"created_at": "2016-09-15 09:41:11",
"updated_at": "2016-09-15 10:36:37",
"comment_count": 0
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 4,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Request Offers [/requests/{id}/offers?api_key={api_key}]
Use this endpoint to get all offers from traveller.
Note: Only the owner of request can access this endpoint.
`price_to_pay` attribute is total price that the requester should be pay to gibby.
`price_to_pay` = `price` + `service_fee`
### Request Offers [GET]
*Note: * Only the owner of request can access this endpoint.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Request id
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"request_id": 1,
"item": "Aqua Gelas",
"offered_price": 50000,
"return_date": "2016-08-15",
"delivery_option": "JNE/POS",
"user": "gibster",
"user_id": 3,
"image": {
"original": "http://gibby.stagingapps.net/images/default.jpg"
},
"location": "Jakarta, Indonesia",
"service_fee": 17500,
"price_to_pay": 67500,
"is_accepted": true
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
### Post Offers [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Request id
+ Request (application/json)
{
"collection_method": 2,
"price": 50000,
"return_date": "2016-08-30"
}
+ Response 200 (application/json)
{
"data": {
"id": 13,
"request_id": 2,
"item": "Walnuts",
"offered_price": 50000,
"return_date": "2016-08-30",
"collection_method": 2,
"delivery_option": "JNE/POS",
"user": "Alfa Adhitya",
"user_id": 1,
"image": {
"original": "http://gibby.stagingapps.net/uploads/users/1/14724391771579182457.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/1/14724391771579182457_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/1/14724391771579182457_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/1/14724391771579182457_mini.jpg"
},
"location": "Bandung, Indonesia",
"is_accepted": false
}
}
## Request Comments [/requests/{id}/comments?api_key={api_key}]
Use this endpoint to get all request comments.
### Request Comments [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Request id
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"user": "User A",
"user_id": 2,
"user_image": {
"original": "http://gibby.stagingapps.net/uploads/users/2/14712420492010174410.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/2/14712420492010174410_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/2/14712420492010174410_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/2/14712420492010174410_mini.jpg"
},
"message": "Comment message",
"created_at": "9:44 AM"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
### Post Comments [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Request id
+ Request (application/json)
{
"comments": "lorem ipsum dolor sit amet"
}
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"user": "User A",
"user_id": 2,
"user_image": {
"original": "http://gibby.stagingapps.net/uploads/users/2/14712420492010174410.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/2/14712420492010174410_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/2/14712420492010174410_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/2/14712420492010174410_mini.jpg"
},
"message": "Comment message"
}
]
}
## Users [/user/{id}?api_key={api_key}]
### View User Profile [GET]
Returns a variety of information about the user specified by the required id parameter.
#### Photos
These fields will contain the resized "normal" variant of the user's uploaded image. This "normal" variant is typically 48px by 48px.
By modifying the URL, you can retrieve other variant sizings such as
"bigger", "mini", and "original".
Consult the table below for more examples:
| Variant | Dimensions | Example URL |
|----------|--------------|------------------------------------------------------------------------------|
| normal | 48px by 48px | http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_normal.jpg |
| bigger | 73px by 73px | http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_bigger.jpg |
| mini | 24px by 24px | http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_mini.jpg |
| original | original | http://gibby.stagingapps.net/uploads/users/1/14666660911234851770.jpg |
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ id (number, required) - The ID of the user for whom to return results for
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data":
{
"id": 1,
"email": "email@gibby.stagingapps.net",
"username": "my_username",
"name": "My Name",
"gender": "Men",
"address": "Bandung",
"country_id": 1,
"country": "Indonesia",
"city_id": 1,
"city": "Bandung",
"date_of_birth": "1989-01-01",
"phone": "+628572295123",
"photos": {
"original": "http://gibby.stagingapps.net/uploads/users/1/14666660911234851770.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_mini.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_normal.jpg",
"bigger": "http://gibby.stagingapps.net/uploads/users/1/14666660911234851770_bigger.jpg"
},
"about_me": "Lorem Ipsum",
"trips": 0,
"requests": 0,
"followers": 0,
"following": 0,
"access_token": "IwuUO3aeLT6mxCn8a2MM74egljZfN74l"
}
}
## Friendship [/user/follow?api_key={api_key}]
### Follow User [POST]
Allows the authenticating users to follow the user specified in the user_id parameter.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Attributes
+ user_id (number) - The ID of the user for whom to befriend.
+ Request (application/json)
{
"user_id": 1
}
+ Response 200 (application/json)
{
"data":
{
"message": "success"
}
}
## Followers [/user/followers?api_key={api_key}{&user_id}]
This endpoint get lists all followers.
### List All followers [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ user_id (integer, optional) - User ID
+ Response 200 (application/json)
{
"data": [
{
"name": "User A",
"images": {
"original": "http://gibby.stagingapps.net/uploads/users/5/14712286201710054987.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/5/14712286201710054987_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/5/14712286201710054987_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/5/14712286201710054987_mini.jpg"
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Followings [/user/followings?api_key={api_key}{&user_id}]
This endpoint get lists all followings.
### List All followings [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ user_id (integer, optional) - User ID
+ Response 200 (application/json)
{
"data": [
{
"name": "User A",
"images": {
"original": "http://gibby.stagingapps.net/uploads/users/5/14712286201710054987.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/5/14712286201710054987_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/5/14712286201710054987_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/5/14712286201710054987_mini.jpg"
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Setting [/user/setting?api_key={api_key}]
This endpoint get lists user's setting.
### GET Setting [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"user_id": 107,
"new_follower": false,
"new_comment": false,
"new_request_inspired": false,
"new_post_from_users_you_follow": false,
"withdrawal_related_notifications": true,
"request_related_notifications": true,
"offer_related_notifications": true,
"deal_related_notifications": true,
"cancellation_notifications": true,
"new_message": true,
"created_at": "2017-01-25 10:44:15",
"updated_at": "2017-01-25 10:44:15"
}
}
### Update Setting [POST]
Use this endpoint to update user setting.
All setting attribute must be true or false. or you can use 1 as true and 0 as false.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"email_new_comment":true,
"email_new_follower":true,
"email_new_matched_request":true,
"email_inspired_request":true,
"email_new_post_followed":true,
"email_new_post_request":true,
"email_new_request_follow_search":true,
"email_new_offer":true,
"email_offer_accepted":true,
"email_offer_declined":true,
"email_request_has_paid":true,
"email_cancelled_by_request":true,
"email_cancelled_by_traveller":true,
"email_new_message":true,
"email_expired_request":true,
"email_credit_was_created":true,
"email_fee_was_added":true,
"email_item_was_received":true,
"email_payment_was_expired":true,
"email_request_was_delivered":true,
"email_tracking_was_added":true,
"email_tracking_was_updated":true,
"email_trip_was_created":true,
"fcm_new_comment":true,
"fcm_new_follower":true,
"fcm_new_matched_request":true,
"fcm_inspired_request":true,
"fcm_new_offer":true,
"fcm_offer_declined":true,
"fcm_offer_accepted":true,
"fcm_new_post_followed":true,
"fcm_new_post_request":true,
"fcm_canceled_by_request":true,
"fcm_canceled_by_traveller":true,
"fcm_request_has_paid":true,
"fcm_new_message":true,
"fcm_expired_request":true,
"fcm_credit_was_created":true,
"fcm_fee_was_added":true,
"fcm_item_was_received":true,
"fcm_payment_was_expired":true,
"fcm_request_was_delivered":true,
"fcm_tracking_was_added":true,
"fcm_tracking_was_updated":true,
"fcm_trip_was_created":true
}
+ Response 200 (application/json)
{
"data": {
"user_id": 2,
"email_new_comment": true,
"email_new_follower": true,
"email_new_matched_request": true,
"email_inspired_request": true,
"email_new_post_followed": true,
"created_at": "2016-09-01 10:13:04",
"updated_at": "2016-09-05 09:20:19",
"email_new_post_request": true,
"email_new_request_follow_search": true,
"email_new_offer": true,
"email_offer_accepted": true,
"email_offer_declined": true,
"email_request_has_paid": true,
"email_cancelled_by_request": true,
"email_cancelled_by_traveller": true,
"email_new_message": true,
"fcm_new_comment": true,
"fcm_new_follower": true,
"fcm_new_matched_request": true,
"fcm_inspired_request": true,
"fcm_new_offer": true,
"fcm_offer_declined": true,
"fcm_offer_accepted": true,
"fcm_new_post_followed": true,
"fcm_new_post_request": true,
"fcm_canceled_by_request": true,
"fcm_canceled_by_traveller": true,
"fcm_request_has_paid": true,
"fcm_new_message": true,
"email_expired_request": true,
"fcm_expired_request": true,
"email_credit_was_created": true,
"fcm_credit_was_created": true,
"email_fee_was_added": true,
"fcm_fee_was_added": true,
"email_item_was_received": true,
"fcm_item_was_received": true,
"email_payment_was_expired": true,
"fcm_payment_was_expired": true,
"email_request_was_delivered": true,
"fcm_request_was_delivered": true,
"email_tracking_was_added": true,
"fcm_tracking_was_added": true,
"email_tracking_was_updated": true,
"fcm_tracking_was_updated": true,
"email_trip_was_created": true,
"fcm_trip_was_created": true
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "The email new comment field must be true or false."
}
}
## Notifications [/user/notifications?api_key={api_key}]
### List All Notifications [GET]
This endpoint get lists all notifications.
`type` field can be filled by :
1 = Credit
2 = Request
3 = Tracking
4 = Rating / Feedback
5 = User Profile
6 = Request Offer
7 = Trip
8 = Unpaid Request
9 = Top Up
10 = Bank Setting
11 = Terms & Cond. Page
12 = Privacy & Policy Page
13 = Home
14 = Comment Request
15 = Request Matched
99 = Undefined
* Note :
is_read = true if notification already openned.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": "b85ba428-8a89-4dba-8f21-1c25efe4f2d7",
"message": "alfa adhitya has offered to help you buy Aqua Gelas for \n20.000 and will return to Indonesia on Oct 9, 2016",
"is_read" : true,
"data": {
"request_id": 16,
"request_offer_id": 14,
"return_date": "Oct 9, 2016",
"item": "Aqua Gelas",
"offer_price": "\n20.000"
},
"image": "http://gibby.stagingapps.net/uploads/users/2/1473737784904715346_mini.jpg",
"created_at": "2016-09-13 11:30:02"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Detail Notification [/user/notifications/{id}?api_key={api_key}]
### Get Detail Notification [GET]
This endpoint to retrieve detail notifications
`data` field contains different data according to the `type` field
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ id (string, required) - Notifications Id
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"id": "b7a30cfb-981d-4183-a49c-a644f8844e7f",
"message": "Automatic Cancellation Notice: Request #46 – bika ambon from Indonesia, Medan.",
"type": 2,
"data": {...},
"created_at": "2016-11-01 13:08:33"
}
}
## News [/user/news?api_key={api_key}]
This endpoint get lists all News.
`type` field can be filled by :
11 = Terms & Cond. Page
12 = Privacy & Policy Page
### List All News [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": "2d9601a0-dd84-453f-8c65-e03432aafbe1",
"type": 12,
"message": "We have made some changes on our Privacy Policy page. Please kindly read through it and contact us at help@gibby.id if you have any question.",
"is_read": false,
"data": {
"id": 2,
"title": "Privacy Policy",
"slug": "privacy-policy",
"type": 12
},
"image": "http://gibby.dev/gibby/img/logo-gibby-notifications.png",
"created_at": "2016-12-09 15:43:07"
},
{
"id": "a9fbc609-534b-4701-87f0-858e8cce60fa",
"type": 11,
"message": "We have made some changes on our Terms and Condition page. Please kindly read through it and contact us at help@gibby.id if you have any question.",
"is_read": false,
"data": {
"id": 1,
"title": "Terms and Condition",
"slug": "terms-and-condition",
"type": 11
},
"image": "http://gibby.dev/gibby/img/logo-gibby-notifications.png",
"created_at": "2016-12-06 14:07:02"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Detail News [/user/news/{id}?api_key={api_key}]
### Get Detail News [GET]
This endpoint to retrieve detail news
`data` field contains different data according to the `type` field
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ id (string, required) - News Id
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"id": "6ba4db6a-d242-4d44-9ffe-8deff45ad374",
"message": "We have made some changes on our Terms and Condition page. Please kindly read through it and contact us at help@gibby.id if you have any question.",
"type": 11,
"data": {
"id": 1,
"title": "Terms and Condition",
"slug": "terms-and-condition",
"type": 11
},
"created_at": "2016-12-14 18:24:13"
}
}
## Accept Offer [/requests/{id}/offers/accept?api_key={api_key}]
### Accept Offer [POST]
Use this endpoint to accept an offer.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ offer_id (number) - The ID of request offer
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (number, required) - Request Id
+ Request (application/json)
{
"offer_id": "1"
}
+ Response 200 (application/json)
{
"data": {
"message": "You have successfully accept this offer"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "This offer is already accepted"
}
}
## Decline Offer [/requests/{id}/offers/decline?api_key={api_key}]
### Decline Offer [POST]
Use this endpoint to decline an offer.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ offer_id (number, required) - The ID of request offer
+ decline_status_id (number, required) - Decline status
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (number, required) - Request Id
+ Request (application/json)
{
"offer_id": "1"
}
+ Response 200 (application/json)
{
"data": {
"message": "You have successfully accept this offer"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "This offer is already accepted"
}
}
## Cancel Offer [/requests/{id}/offers/cancel?api_key={api_key}]
### Cancel Offer [POST]
Use this endpoint when accepted traveller want to cancel his offer.
*Note*: Only accepted traveller can use this endpoint.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ cancel_status_id (number) - The ID of cancel status. You can get the list of ids from status endpoint, with type value is "traveller_cancel"
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (number, required) - Request Id
+ Request (application/json)
{
"cancel_status_id": 1
}
+ Response 200 (application/json)
{
"data": {
"message": "You have been successfully cancel this offer"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "The selected cancel status id is invalid."
}
}
## Cancel Request [/requests/{id}/cancel?api_key={api_key}]
### Cancel Request [POST]
Use this endpoint when requester want to cancel his request.
*Note*: Only requester can use this endpoint.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ cancel_status_id (number) - The ID of cancel status. You can get the list of ids from status endpoint, with type value is "requester_cancel"
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (number, required) - Request Id
+ Request (application/json)
{
"cancel_status_id": 1
}
+ Response 200 (application/json)
{
"data": {
"message": "You have successfully cancel this request"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "The selected cancel status id is invalid."
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "You've already place a deposit for this request, you are not able to cancel this request."
}
}
## Status [/statuses?api_key={api_key}&type={type}]
### List all status [GET]
| type available option |
|------------------------|
| requester_cancel |
| traveller_cancel |
| decline |
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ type (string, required) - type cancel
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"name": "do not want it anymore",
"type": "decline"
},
{
"id": 2,
"name": "need to edit request",
"type": "decline"
},
{
"id": 3,
"name": "price is not agreeable",
"type": "decline"
},
{
"id": 4,
"name": "return date is not agreeable",
"type": "decline"
},
{
"id": 5,
"name": "prefer other traveller",
"type": "decline"
}
],
"meta": {
"pagination": {
"total": 5,
"count": 5,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Terms and Condition [/pages/terms-and-condition?api_key={api_key}]
### Terms and Condition [GET]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"id": 1,
"title": "Terms and Condition",
"subtitle": "Gibby Terms and Condition",
"content": "<p>Terms and Condition Content.</p>"
}
}
+ Response 404 (application/json)
{
"error": {
"http_code": 404,
"message": "Resource Not Found"
}
}
## Privacy Policy [/pages/privacy-policy?api_key={api_key}]
### Privacy Policy [GET]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"id": 1,
"title": "Privacy Policy",
"subtitle": "Privacy Policy",
"content": "<p>Privacy Policy Content.</p>"
}
}
+ Response 404 (application/json)
{
"error": {
"http_code": 404,
"message": "Resource Not Found"
}
}
## History Tracking As Requester [/trackings/requester?api_key={api_key}]
### List request [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 2,
"images": [
{
"original": "http://gibby.stagingapps.net/uploads/requests/2/14724504081890711410.jpg",
"normal": "http://gibby.stagingapps.net/uploads/requests/2/14724504081890711410_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/requests/2/14724504081890711410_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/requests/2/14724504081890711410_mini.jpg",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/2/14724504081890711410_thumbnail.jpg"
}
],
"item_name": "Walnuts",
"status": "Completed"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## History Tracking As Traveller [/trackings/traveller?api_key={api_key}]
On Progress
### List request [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Tracking Detail [/trackings/{id}?api_key={api_key}]
### Tracking Detail [GET]
Get tracking detail.
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ id (integer, required) - Request ID
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"id": 65,
"item": "Test 1",
"images": [
{
"original": "http://gibby.stagingapps.net/uploads/requests/63/14805957551272370852.jpg"
}
],
"price": 20000,
"delivery_option": "JNE/POS",
"delivery_country": "Indonesia",
"delivery_city": "Bandung",
"delivery_address": "For Meet up\r\nPlease arrange with traveller\r\nFor Delivery via JNE/POS/GOJEK item will be delivered to your address\r\nJalan cihampelas No.80, Tamansari, Bandung Wetan Jawa Barat 40116",
"status": "Completed",
"tracking_number": "BDOX801864988916",
"is_requester": false,
"offeredBy": "fiqa18",
"requestBy": "yuri",
"delivered_at": "2016-12-21",
"received_at": "2016-12-21",
"traveller_number": "858958658",
"requester_number": "456456",
"tracking_details": [
{
"id": 59,
"tracking_id": 14,
"tag": "Delivered",
"checkpoint_time": "2016-12-05 18:56:00",
"message": "DELIVERED",
"location": null,
"created_at": "2016-12-21 14:41:41",
"updated_at": "2016-12-21 14:41:41"
},
{
"id": 58,
"tracking_id": 14,
"tag": "OutForDelivery",
"checkpoint_time": "2016-12-05 09:23:00",
"message": "ON PROCESS",
"location": null,
"created_at": "2016-12-21 14:41:41",
"updated_at": "2016-12-21 14:41:41"
},
{
"id": 57,
"tracking_id": 14,
"tag": "OutForDelivery",
"checkpoint_time": "2016-12-03 08:04:00",
"message": "ON PROCESS",
"location": null,
"created_at": "2016-12-21 14:41:41",
"updated_at": "2016-12-21 14:41:41"
},
{
"id": 56,
"tracking_id": 14,
"tag": "InTransit",
"checkpoint_time": "2016-12-02 23:10:00",
"message": "Received On Destination",
"location": null,
"created_at": "2016-12-21 14:41:41",
"updated_at": "2016-12-21 14:41:41"
},
{
"id": 55,
"tracking_id": 14,
"tag": "InfoReceived",
"checkpoint_time": "2016-12-02 08:00:00",
"message": "Manifested",
"location": null,
"created_at": "2016-12-21 14:41:41",
"updated_at": "2016-12-21 14:41:41"
}
]
}
}
+ Response (application/json)
{
"error": {
"http_code": 404,
"message": "Resource Not Found"
}
}
## Confirm Purchased [/trackings/{id}/purchase?api_key={api_key}]
### Confirm Purchased [POST]
Use this endpoint for traveller to confirm item purchasing.
`slug` can be retrieved from Couriers API
*Note: * Only accepted traveller can use this endpoint
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ id (integer, required) - Request ID
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"purchased_date": "2016-10-10"
}
+ Response 200 (application/json)
{
"http_code": 201,
"message": "You have been successfully mark this request as \"Purchase\", Please wait until the requester confirm that he receive the item",
"data": {
"tracking_ship_date": "2016-10-10"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "You have already mark this request as purchase"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "You don't have any traveller offering"
}
}
## Confirm Delivery [/trackings/{id}/deliver?api_key={api_key}]
### Confirm Delivery [POST]
Use this endpoint for traveller to confirm item delivery.
`slug` can be retrieved from Couriers API
*Note: * Only accepted traveller can use this endpoint
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ tracking_ship_date (string) - Delivery Date
+ tracking_number (string, optional) - Tracking number, it will be required when collection method using JNE/POS
+ slug (string, optional) - Courier slug, it will be required when collection method using JNE/POS
+ Parameters
+ id (integer, required) - Request ID
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"tracking_ship_date": "2016-10-10"
}
+ Response 200 (application/json)
{
"http_code": 201,
"message": "You have been successfully mark this request as \"Deliver\", Please wait until the requester confirm that he receive the item",
"data": {
"tracking_ship_date": "2016-10-10"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "You have already mark this request as deliver"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "You don't have any traveller offering"
}
}
## Confirm Receive [/trackings/{id}/receive?api_key={api_key}]
### Confirm Receive [POST]
Use this endpoint for requester to confirm item receive.
*Note:* Only owner of request can use this endpoint
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ received_at (string) - Received Date
+ Parameters
+ id (integer, required) - Request ID
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"received_at": "2016-10-10"
}
+ Response 200 (application/json)
{
"http_code": 201,
"message": "You have successfully receive this request. Money will be forwarded to traveller",
"data": {
"received_at": "2016-10-10"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "You have already mark this request as deliver"
}
}
## Messages [/messages?api_key={api_key}&type={type}]
### Get List messages [GET]
Use this endpoint to get all list messages
* Note
is_read = true if messages already openned
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ type (string, optional) - type (available value: traveller, requester, archive)
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"subject": "Request #1 - Walnuts",
"request_id": 1,
"request_image": {
"original": "http://gibby.dev/uploads/requests/6/14811880731902153304.jpg",
"normal": "http://gibby.dev/uploads/requests/6/14811880731902153304_normal.jpg",
"small": "http://gibby.dev/uploads/requests/6/14811880731902153304_small.jpg",
"mini": "http://gibby.dev/uploads/requests/6/14811880731902153304_mini.jpg",
"thumbnail": "http://gibby.dev/uploads/requests/6/14811880731902153304_thumbnail.jpg"
},
"accepted_offer": {
"id": 1,
"offer_price": 50000,
"return_date": "2016-09-15",
"traveller": "Alfa Adhitya",
"traveller_location": "Bandung, Indonesia",
"collection_method": "Meet Up"
},
"is_read": true,
"is_archive": false,
"is_traveller": true,
"allow_conversation": true,
"sender": "Suci Requester",
"sender_images": {
"original": "http://gibby.stagingapps.net/uploads/users/4/14767908941784535917.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/4/14767908941784535917_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/4/14767908941784535917_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/4/14767908941784535917_mini.jpg"
},
"created_at": "2016-09-15 10:18:06",
"updated_at": "2016-09-15 10:18:06"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Message Detail [/messages/{id}?api_key={api_key}]
### View Message detail [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (number, required) - Message ID
+ Response 200 (application/json)
{
"data": {
"id": 1,
"subject": "Request #1 - Walnuts",
"request_id": 1,
"accepted_offer": {
"id": 1,
"offer_price": 50000,
"return_date": "Sep 17, 2016",
"traveller": "Alfa Adhitya",
"traveller_location": "Bandung, Indonesia",
"collection_method": "Meet Up"
},
"is_read": true,
"is_archive": false,
"is_traveller": true,
"allow_conversation": true,
"sender": "Suci Requester",
"sender_images": {
"original": "http://gibby.stagingapps.net/uploads/users/4/14767908941784535917.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/4/14767908941784535917_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/4/14767908941784535917_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/4/14767908941784535917_mini.jpg"
},
"created_at": "2016-09-15 10:18:06",
"updated_at": "2016-09-15 10:18:06"
}
}
## Message Conversations [/messages/{id}/conversations?api_key={api_key}]
### Get Message conversations [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (number, required) - Message ID
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"content": "Test",
"content_image": {
"original": "http://gibby.stagingapps.net/uploads/conversations/3/14784931221198876268.jpg",
"normal": "http://gibby.stagingapps.net/uploads/conversations/3/14784931221198876268_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/conversations/3/14784931221198876268_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/conversations/3/14784931221198876268_mini.jpg"
},
"user": {
"id": 1,
"name": "admin",
"images": {
"original": "http://gibby.stagingapps.net/images/default.jpg",
"normal": "http://gibby.stagingapps.net/images/default.jpg",
"small": "http://gibby.stagingapps.net/images/default.jpg",
"mini": "http://gibby.stagingapps.net/images/default.jpg"
}
},
"is_traveller": true,
"created_at": "2016-09-15 14:56:06",
"updated_at": "2016-09-15 14:56:06"
},
{
"id": 2,
"content": "Hi bro",
"user": {
"id": 2,
"name": "Alfa Adhitya",
"images": {
"original": "http://gibby.stagingapps.net/uploads/users/2/1473907123141314564.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/2/1473907123141314564_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/2/1473907123141314564_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/2/1473907123141314564_mini.jpg"
}
},
"is_traveller": false,
"created_at": "2016-09-15 15:03:25",
"updated_at": "2016-09-15 15:03:25"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
### Post Message Conversations [POST]
#### Cropping Image
send form-data `cropped_opt` string value with format "width,height,x,y"
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Message ID
+ Request (multipart/form-data; boundary=---BOUNDARY)
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="content"
pempek enak lohh
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="content_image"; filename=""
Content-Type:
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Content-Disposition: form-data; name="cropped_opt"
100,100,12,15
+ Response 200 (application/json)
{
"data": {
"id": 4,
"content": "lorem ipsum dolor sit amet",
"content_image": {
"original": "http://gibby.stagingapps.net/uploads/conversations/3/14784931221198876268.jpg",
"normal": "http://gibby.stagingapps.net/uploads/conversations/3/14784931221198876268_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/conversations/3/14784931221198876268_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/conversations/3/14784931221198876268_mini.jpg"
},
"user": {
"id": 2,
"name": "Alfa Adhitya",
"images": {
"original": "http://gibby.stagingapps.net/uploads/users/2/1473907123141314564.jpg",
"normal": "http://gibby.stagingapps.net/uploads/users/2/1473907123141314564_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/users/2/1473907123141314564_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/users/2/1473907123141314564_mini.jpg"
}
},
"created_at": "2016-09-15 15:19:45",
"updated_at": "2016-09-15 15:19:45"
}
}
## Archive Message [/messages/{id}/archive]
### Archive Message [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Message ID
+ Request (application/json)
{}
+ Response 200 (application/json)
{
"data": {
"message": "Messages Archived"
}
}
+ Response 404
{
"error": {
"http_code": 404,
"message": "Resource Not Found"
}
}
## Unarchive Message [/messages/{id}/unarchive]
### Unarchive Message [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Message ID
+ Request (application/json)
{}
+ Response 200 (application/json)
{
"data": {
"message": "Messages Unarchived"
}
}
+ Response 404
{
"error": {
"http_code": 404,
"message": "Resource Not Found"
}
}
## Delete Message [/messages/{id}/delete]
### Delete Message [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - Message ID
+ Request (application/json)
{}
+ Response 200 (application/json)
{
"data": {
"message": "Messages Deleted"
}
}
+ Response 404
{
"error": {
"http_code": 404,
"message": "Resource Not Found"
}
}
## Doku Payment [/credits/words?api_key={api_key}]
### Doku Payment [POST]
Use this endpoint for requester / traveller to deposit gibby credit.
#### PAYMENT CHANNEL DOKU:
| Status | Description |
|--------|-----------------------------|
| 04 | DOKU Wallet |
| 05 | ATM Transfer |
| 15 | Credit Card |
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ amount (string) - Payment Amount, number format comma separated.
+ paymentchannel (string) - Payment Channel given by DOKU.
+ tran_ids (array, optional) - Id item request.
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"amount": "500,000",
"paymentchannel": "04",
"tran_ids": [8,7]
}
+ Response 200 (application/json)
{
"data": {
"MALLID": "3588",
"BASKET": "TOPUP Credit,500000.00,1,500000.00",
"CHAINMERCHANT": "NA",
"AMOUNT": "500000.00",
"PURCHASEAMOUNT": "500000.00",
"TRANSIDMERCHANT": "TOPUP_VzjKIEwSBP",
"WORDS": "d41b3f0a893a214c8166e438aa7a8aaed704355f",
"CURRENCY": "360",
"PURCHASECURRENCY": "360",
"COUNTRY": "ID",
"SESSIONID": "T2UfmDGtlX",
"REQUESTDATETIME": "20161004092748",
"NAME": "Isyana Sarasvati",
"EMAIL": "isyarasvati@gmail.com",
"ADDRESS": "Jln. Soekarno Hatta no. 104\r\nBandung",
"CITY": "Bandung",
"STATE": "Bandung",
"MOBILEPHONE": "085485596523",
"ZIPCODE": "40852",
"PAYMENTCHANNEL": "04"
}
}
+ Response 422 (application/json)
{
"error": {
"code": "GEN-UNPROCESSABLE",
"http_code": 422,
"message": "amount or paymentchannel must exist"
}
}
## Banks [/banks?api_key={api_key}]
### View list of available banks [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"name": "BCA",
"created_at": "2016-10-25 09:32:19",
"updated_at": "2016-10-25 09:32:19"
},
{
"id": 2,
"name": "BNI",
"created_at": "2016-10-25 09:32:19",
"updated_at": "2016-10-25 09:32:19"
},
{
"id": 3,
"name": "Mandiri",
"created_at": "2016-10-25 09:32:19",
"updated_at": "2016-10-25 09:32:19"
}
],
"meta": {
"pagination": {
"total": 3,
"count": 3,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Payout Method [/user/payout-method?api_key={api_key}]
### Get current payout method [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"user_id": 2,
"bank_account_holder_name": "Alfa Adhitya Arifin",
"bank_account_number": "1234567891011",
"bank_id": 2,
"bank": "BNI"
}
}
### Update payout method [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"bank_account_holder_name": "Alfa Adhitya Arifin",
"bank_account_number": "1234567891011",
"bank_id": 2
}
+ Response 200 (application/json)
{
"data": {
"user_id": 2,
"bank_account_holder_name": "Alfa Adhitya Arifin",
"bank_account_number": "1234567891011",
"bank_id": 2,
"bank": "BNI"
}
}
## Withdrawal Request [/withdrawal?api_key={api_key}]
### Withdraw [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"account_holder": "Alfa Adhitya Arifin",
"account_number": "1234567891011",
"bank_id": 2,
"amount": 200000
}
+ Response 200 (application/json)
{
"data": {
"id": 5,
"account_holder": "Alfa Adhitya Arifin",
"account_number": "1234567891011",
"bank_id": 2,
"bank": "BNI",
"created_at": "2016-10-26 10:29:03",
"updated_at": "2016-10-26 10:29:03"
}
}
+ Response 422 (application/json)
{
"error": {
"http_code": 422,
"message": "The amount may not be greater than 40000.00."
}
}
## User feedback [/user/{id}/reviews?api_key={api_key}&type={type}]
### GET Feedback [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - User id
+ type (string, optional) - available value requester, traveller (default value requester)
+ Response 200 (application/json)
{
"data": [
{
"id": 10,
"rating": 5,
"comments": "Test Comment",
"request_id": 3,
"user": {
"id": 3,
"name": "Gibster",
"images": {
"original": "http://gibby.dev/uploads/users/3/1477363182631637542.png",
"normal": "http://gibby.dev/uploads/users/3/1477363182631637542_normal.png",
"small": "http://gibby.dev/uploads/users/3/1477363182631637542_small.png",
"mini": "http://gibby.dev/uploads/users/3/1477363182631637542_mini.png"
}
},
"created_at": "2016-10-27 15:12:59",
"updated_at": "2016-10-27 15:12:59"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
### POST Feedback [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ id (integer, required) - User id
+ type (string, optional) - available value requester, traveller
+ Request (application/json)
{
"rating":5,
"request_id":3,
"comments":"Test Comment"
}
+ Response 200 (application/json)
{
"data": {
"id": 10,
"rating": 5,
"comments": "Test Comment",
"request_id": 3,
"user": {
"id": 3,
"name": "Gibster",
"images": {
"original": "http://gibby.dev/uploads/users/3/1477363182631637542.png",
"normal": "http://gibby.dev/uploads/users/3/1477363182631637542_normal.png",
"small": "http://gibby.dev/uploads/users/3/1477363182631637542_small.png",
"mini": "http://gibby.dev/uploads/users/3/1477363182631637542_mini.png"
}
},
"created_at": "2016-10-27 15:12:59",
"updated_at": "2016-10-27 15:12:59"
}
}
+ Response 403 (application/json)
{
"error": {
"http_code": 403,
"message": "You have already rated this user"
}
}
## Matched Request [/user/matched-requests?api_key={api_key}]
### GET Matched Request [GET]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 47,
"item_name": "Adidas NMD Womens Raw Pink",
"category_id": 9,
"category": "Ladies' Fashion & Accessories",
"country_id": 229,
"country": "United Kingdom",
"city_id": null,
"city": null,
"price": 340000,
"brand": "Adidas NMD ",
"quantity": "Qty: 01",
"color_flavour": "Raw Pink (Salmon)",
"size": "Size: US 5 / UK 3.5 / Euro 36",
"original_box": true,
"original_receipt": true,
"status": "Open",
"images": [
{
"original": "http://gibby.stagingapps.net/uploads/requests/21/1476955588923480307.jpg"
}
],
"collection_method_id": 2,
"collection_method": "JNE/POS",
"maximum_delivery_date": "2016-11-05",
"delivery_country_to": 101,
"delivery_county": "Indonesia",
"delivery_city_to": 1,
"delivery_city": "Bandung",
"delivery_address": "Jl. Terusan Buah Batu No.254, Cipagalo, Bojongsoang, Kota Bandung, Jawa Barat 40287\r\nBandung, Indonesia",
"shop_address": "",
"note": "Looking for a kind soul to help purchase this authentic/original item and bring back to Indonesia. Willing to pay more if needed, just name your offer :)",
"user": {
"id": 24,
"name": "nanda.gojek",
"images": {
"original": "http://gibby.stagingapps.net/images/default.jpg",
"normal": "http://gibby.stagingapps.net/images/default.jpg",
"small": "http://gibby.stagingapps.net/images/default.jpg",
"mini": "http://gibby.stagingapps.net/images/default.jpg"
}
},
"has_offer": true,
"has_accepted_offer": false,
"accepted_offer": null,
"is_owner": false,
"created_at": "2016-10-31 13:40:31",
"updated_at": "2016-10-31 13:40:31",
"comment_count": 0,
"can_offer": true
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## List Request Offer by Trip [/users/{user_id}/trips/{trip_id}/{country_id}?api_key={api_key}]
### List Request Offer by Trip [GET]
Use this endpoint to retrieve list user request offer by trip
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 2,
"user_id": 2,
"request_id": 3,
"request_name": "Prima MR",
"request_url": "http://gibby.stagingapps.net/requests/3-jaket-parka",
"item_name": "Jaket Parka",
"status": "Open",
"images": {
"original": "http://gibby.stagingapps.net/uploads/requests/3/14779730261609828451.jpg",
"normal": "http://gibby.stagingapps.net/uploads/requests/3/14779730261609828451_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/requests/3/14779730261609828451_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/requests/3/14779730261609828451_mini.jpg",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/3/14779730261609828451_thumbnail.jpg"
}
},
{
"id": 3,
"user_id": 2,
"request_id": 4,
"request_name": "Prima MR",
"request_url": "http://gibby.stagingapps.net/requests/4-kaos-manchester-united",
"item_name": "Kaos Manchester United",
"status": "Open",
"images": {
"original": "http://gibby.stagingapps.net/uploads/requests/4/14779731021554119655.jpg",
"normal": "http://gibby.stagingapps.net/uploads/requests/4/14779731021554119655_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/requests/4/14779731021554119655_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/requests/4/14779731021554119655_mini.jpg",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/4/14779731021554119655_thumbnail.jpg"
}
},
{
"id": 4,
"user_id": 2,
"request_id": 5,
"request_name": "Prima MR",
"request_url": "http://gibby.stagingapps.net/requests/5-oculus-rift",
"item_name": "Oculus Rift",
"status": "Pending Deposit",
"images": {
"original": "http://gibby.stagingapps.net/uploads/requests/5/1477973166871096096.jpg",
"normal": "http://gibby.stagingapps.net/uploads/requests/5/1477973166871096096_normal.jpg",
"small": "http://gibby.stagingapps.net/uploads/requests/5/1477973166871096096_small.jpg",
"mini": "http://gibby.stagingapps.net/uploads/requests/5/1477973166871096096_mini.jpg",
"thumbnail": "http://gibby.stagingapps.net/uploads/requests/5/1477973166871096096_thumbnail.jpg"
}
}
],
"meta": {
"pagination": {
"total": 3,
"count": 3,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## All Countries [/countries/list?api_key={api_key}]
### All Countries [GET]
Use this endpoint to retrieve all countries alphabetically
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"name": "Afghanistan"
},
{
"id": 2,
"name": "Albania"
},
{
"id": 3,
"name": "Algeria"
},
{
"id": 4,
"name": "American Samoa"
} dst ...
]
}
## Unread Badges [/user/unread-badges?api_key={api_key}]
### Unread Badges [GET]
Use this endpoint to retrieve sum of all unread messages/notifications
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": {
"unread_notifications": 3,
"unread_news": 1,
"unread_badges": 4,
"unread_messages": 0
}
}
## Doku Redirect [/credits/redirect]
### Doku Redirect [POST]
This endpoint will hit automatically by Doku system, sent appropriate response according by payment channel
+ Response 200 (application/json)
{
"data": {
"message": "Top Up Success"
}
}
## Doku Redirect Debug [/credits/redirect]
### Doku Redirect Debug [POST]
Use this endpoint to debug response transaction from doku redirect
* Note :
STATUSCODE = `0000` for success transaction
from_device always contain `true` value
+ Headers
Content-Type: multipart/form-data; boundary=----BOUNDARY
+ Attributes
+ AMOUNT (number)
+ TRANSIDMERCHANT (string)
+ STATUSCODE (string)
+ WORDS (string) - sha1 value of (AMOUNT + Shared Key + TRANSIDMERCHANT + STATUSCODE)
+ PAYMENTCHANNEL (string)
+ SESSIONID (string)
+ from_device (boolean)
+ Requests
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="AMOUNT"
18150.00
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="TRANSIDMERCHANT"
TOPUP_112432NAxB0
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="STATUSCODE"
0000
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="WORDS"
6ff64e8599fa5dbef191e5fb84e0d3a8b973db92
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="PAYMENTCHANNEL"
15
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="SESSIONID"
HUOFnkC6kT
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="from_device"
true
------WebKitFormBoundary7MA4YWxkTrZu0gW--
+ Response 200 (application/json)
{
"data": {
"message": "Your payment for item request Tamagoci paid successfully"
}
}
## List Decline Status [/list_declines?api_key={api_key}]
Use this endpoint to get all decline list statuses
### List Decline Status [GET]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"name": "do not want it anymore",
"type": "decline",
"created_at": "2016-11-07 10:41:47",
"updated_at": "2016-11-07 10:41:47"
},
{
"id": 2,
"name": "need to edit request",
"type": "decline",
"created_at": "2016-11-07 10:41:47",
"updated_at": "2016-11-07 10:41:47"
},
{
"id": 3,
"name": "price is not agreeable",
"type": "decline",
"created_at": "2016-11-07 10:41:47",
"updated_at": "2016-11-07 10:41:47"
},
{
"id": 4,
"name": "return date is not agreeable",
"type": "decline",
"created_at": "2016-11-07 10:41:47",
"updated_at": "2016-11-07 10:41:47"
},
{
"id": 5,
"name": "prefer other traveller",
"type": "decline",
"created_at": "2016-11-07 10:41:47",
"updated_at": "2016-11-07 10:41:47"
}
],
"meta": {
"pagination": {
"total": 5,
"count": 5,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## List Notifications [/notifications?api_key={api_key}]
Use this endpoint to retrieve all notifications
### List Notifications [GET]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 1,
"message": "Libur",
"is_active": false,
"created_at": "2016-11-02 11:00:35",
"updated_at": "2016-11-14 11:53:49"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
## Report Item [/report?api_key={api_key}]
Use this endpoint to report item request
### Report Item [POST]
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"request_id" : 1
}
+ Response 200 (application/json)
{
"data": {
"http_code": 200,
"message": "This request reported successfully"
}
}
## Logout [/logout?api_key={api_key}&token={token}]
Use this endpoint to logout the user and remove token from device.
### Logout [GET]
+ Headers
Content-Type: application/json
+ Parameters
+ api_key (string, required) - Consumer API Key
+ token (string, required) - token devices
+ Response 200 (application/json)
{
"data": {
"action": "logout",
"status": true
}
}
## Complain [/trackings/complain?api_key={api_key}]
### Complain Request [POST]
Use this endpoint to complain request.
#### Status Complain Table
| id | Description |
|----|--------------------------|
| 1 | Item is not delivered |
| 2 | Item is not as described |
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ request_id (number) - The ID of item request
+ status_complain (number) - See the table status complain
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"request_id" : 12,
"status_complain" : 1
}
+ Response 200 (application/json)
{
"data": {
"http_code": 200,
"message": "You've successfully complain this item"
}
}
+ Response 422 (application/json)
{
"error":
{
"code": "GEN-UNPROCESSABLE",
"http_code": 422,
"message": "The status complain field is required."
}
}
## Create Chat Room Requester [/room-messages/{requestId}/requester?api_key={api_key}]
### Create Chat-Room by Requester [POST]
Use this endpoint to create chat room by requester.
Member Id is traveller user id
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ request_id (number) - The ID of item request
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"member_id" : 46
}
+ Response 200 (application/json)
{
"data": {
"id": 7,
"room_name": "room@67",
"request_id": 67,
"request_name": "Piring Emas",
"requester": 40,
"requester_name": "andri oy",
"traveller": 46,
"traveller_name": "andri pertama",
"created_at": "2018-01-02 01:07:16"
}
}
+ Response 422 (application/json)
{
"error":
{
"code": "GEN-UNPROCESSABLE",
"http_code": 422,
"message": "request id not found"
}
}
## Create Chat Room Traveller [/room-messages/{requestId}/traveller?api_key={api_key}]
### Create Chat-Room by Traveller [POST]
Use this endpoint to create chat room by traveller.
Member Id is requester user id
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Attributes
+ request_id (number) - The ID of item request
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Request (application/json)
{
"member_id" : 46
}
+ Response 200 (application/json)
{
"data": {
"id": 7,
"room_name": "room@67",
"request_id": 67,
"request_name": "Piring Emas",
"requester": 40,
"requester_name": "andri oy",
"traveller": 46,
"traveller_name": "andri pertama",
"created_at": "2018-01-02 01:07:16"
}
}
+ Response 422 (application/json)
{
"error":
{
"code": "GEN-UNPROCESSABLE",
"http_code": 422,
"message": "request id not found"
}
}
## List Chat Inbox Requester [/room-messages/requester?api_key={api_key}]
### List Chat Inbox by Requester [GET]
Use this endpoint to list chat room by requester
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 7,
"room_name": "room@67",
"request_id": 67,
"request_name": "Piring Emas",
"request_images": [
{
"original": "http://13.228.98.60/uploads/requests/67/1512964599471213012.jpg",
"normal": "http://13.228.98.60/uploads/requests/67/1512964599471213012_normal.jpg",
"small": "http://13.228.98.60/uploads/requests/67/1512964599471213012_small.jpg",
"mini": "http://13.228.98.60/uploads/requests/67/1512964599471213012_mini.jpg",
"thumbnail": "http://13.228.98.60/uploads/requests/67/1512964599471213012_thumbnail.jpg"
}
],
"requester": 40,
"requester_name": "andri oy",
"traveller": 46,
"traveller_name": "andri pertama",
"created_at": "2018-01-02 01:07:16"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1,
"total_page": 1
}
}
}
+ Response 422 (application/json)
{
"error":
{
"code": "GEN-UNPROCESSABLE",
"http_code": 422,
"message": "request id not found"
}
}
## List Chat Traveller [/room-messages/traveller?api_key={api_key}]
### List Chat Inbox by Traveller [GET]
Use this endpoint to list chat room by traveller
+ Headers
Content-Type: application/json
Authentication: Bearer ACCESS_TOKEN
+ Parameters
+ api_key (string, required) - Consumer API Key
+ Response 200 (application/json)
{
"data": [
{
"id": 7,
"room_name": "room@67",
"request_id": 67,
"request_name": "Piring Emas",
"request_images": [
{
"original": "http://13.228.98.60/uploads/requests/67/1512964599471213012.jpg",
"normal": "http://13.228.98.60/uploads/requests/67/1512964599471213012_normal.jpg",
"small": "http://13.228.98.60/uploads/requests/67/1512964599471213012_small.jpg",
"mini": "http://13.228.98.60/uploads/requests/67/1512964599471213012_mini.jpg",
"thumbnail": "http://13.228.98.60/uploads/requests/67/1512964599471213012_thumbnail.jpg"
}
],
"requester": 40,
"requester_name": "andri oy",
"traveller": 46,
"traveller_name": "andri pertama",
"created_at": "2018-01-02 01:07:16"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1,
"total_page": 1
}
}
}
+ Response 422 (application/json)
{
"error":
{
"code": "GEN-UNPROCESSABLE",
"http_code": 422,
"message": "request id not found"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment