Auth-Service
Link to Docs
https://dev.weav.cloud/auth/docs
External Reporting-Service
Report a driver
- Description: Rider reporting the driver, reportee is the id of driver
- Request:
POST /reporting/rider/:ride_id/:reportee - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: string
Your report has been submitted
- Content-Type:
Report a rider
- Description: Driver reporting the rider, reportee is the id of rider
- Request:
POST /reporting/driver/:ride_id/:reportee - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: string
Your report has been submitted
- Content-Type:
Ride end report
- Description: To be called once when the ride is over to clear up all pending reports
- Request:
POST /reporting/:ride_id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: string
- `` ## Report Issue
- Content-Type:
- Description: Report an issue, collects email, description, rideId, role,
- Request:
POST /reporting/issue - Body:
{"email": "", "description": "", "rideId": "", "role": ""} - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: string
- ``
- Content-Type:
External Penalties-Service
Driver Penalty (On ride start)
- Description: Calculates and applies penalty (if applicable) for a driver, to be used when the ride is started
- Request:
POST /penalties/driver/:id/:ride_id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- Transaction: Object - Transaction object as held in database associated with this penalty
- Content-Type:
External Cancellations-Service
Informative Rider Cancellation
- Description: Get the cancellation dollar amount for a rider
- Request:
GET /cancellations/rider/:id/:request_id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- amount: String - The dollar amount penalty if the cancellation was completed
- Content-Type:
Informative Driver Cancellation
- Description: Get the cancellation dollar amount for a driver
- Request:
GET /cancellations/driver/:id/:request_id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- amount: String - The dollar amount penalty if the cancellation was completed
- amount: String - The dollar amount penalty if the cancellation was completed
- Content-Type:
Assertive Rider Cancellation
- Description: Performs the cancellation for a rider
- Request:
POST /cancellations/rider/:id/:ride_id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- Transaction: Object - Transaction object as held in database associated with this cancellation
- Content-Type:
Assertive Driver Cancellation
- Description: Performs the cancellation for a driver
- Request:
POST /cancellations/driver/:id/:ride_id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- Transaction: Object - Transaction object as held in database associated with this cancellation
- Content-Type:
Notifications Posted
- RIDER_CANCELLED - Posted during Assertive Rider Cancellation
- data: object
- type: "RIDER_CANCELLED"
- title: "Your Ride Has Been Cancelled"
- body: "{{riders name's}} has cancelled your ride from location_x to location_y on date_param"
- rideId: ""
- uid: ""
- data: object
- DRIVER_CANCELLED - Posted during Assertive Driver Cancellation
- data: object
- type: "DRIVER_CANCELLED"
- title: "Your Ride Has Been Cancelled"
- body: "{{driver name's}} has cancelled your ride from location_x to location_y on date_param"
- rideId: ""
- uid: ""
- data: object
External Drivers-License-Service
Get Drivers License Image
- Description: Get the drivers license image
- Request:
GET /drivers-license/:id/drivers_license_image - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- drivers_license_image: String - URL To the drivers license image hosted on azure
- Content-Type:
Put Drivers License Image
- Description: Uploads the drivers license image
- Request:
PUT /drivers-license/:id/drivers_license_image - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Body:
- An image as multipartformdata
- Response: 200
- Content-Type:
application/json - body: object
- User: Object - User associated with the ID, includes a new field drivers_license_image which links a URL to the image
- Content-Type:
External User-Service
Get User
curl -X GET \
https://api.weav.cloud/user/$uid \
-H 'Accept: */*' \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Read the entire user object
- Request:
GET /user/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, A unique user id in unique ObjectId format
- birth_date: Number, The birthdate of the user in Epoch format
- email: String, The email of the user
- phone: String, The phone number of the user
- user_first: String, The first name of the user
- user_last: String, The last name of the user
- profile_image: String, Http link to the users photo
- education: String, A short description of the users education
- about_me: String, A short description of the User
- occupation String, A short descriptions of the users occupation
- vehicles: List of Objects, the list of vehicles the user has registered
- _id: String, The license of the vehicle
- model: String, The Model of the car
- make: String, The make of the car
- year: String, The year of the car
- images: List of Strings, A list of images of the car
- posts: List of Objects, the list of posts the user has made
- _id: String, A unique user id in ObjectId format
- matched: Boolean, a Boolean representing whether or not the post has matches
- depart_time: Number, the epoch time stamp representing the time the post starts or is supposed to start
- depart_location: Object
- city: String, the city the post starts at
- latitude: Number, The latitude the post starts at
- longitude: Number, The longitude the post starts at
- destination_location: Object
- city: String, the city the post starts at
- latitude: Number, The latitude the post starts at
- longitude: Number, The longitude the post starts at
- relation: String, The relation of the user to the post "driver", "requester", "rider", "booked driver"
- type: String, String for whether the post is for a "request" or "ride"
- rides_taken: Number, The number of rides the user has taken
- rides_given: Number, The number of rides the user has given
- rating: Number, The rating of the user
- number_of_reviews; Number, the number of reviews on this user
- Content-Type:
Get Birth Date
curl -X GET \
https://api.weav.cloud/user/${uid}/birth_date \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/birth_date - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- birth_date: Number, The birthdate of the user in Epoch format
- Content-Type:
Get Email
curl -X GET \
https://api.weav.cloud/user/${uid}/email \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/email - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- email: String, The email of the user
- Content-Type:
Get Phone
curl -X GET \
https://api.weav.cloud/user/${uid}/phone \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/phone - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- phone: String, The phone number of the user
- Content-Type:
Get User First
curl -X GET \
https://api.weav.cloud/user/${uid}/user_first \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/user_first - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- user_first: String, The first name of the user
- Content-Type:
Get User Last
curl -X GET \
https://api.weav.cloud/user/${uid}/user_last \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/user_last - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- user_last: String, The last name of the user
- Content-Type:
Get Profile Image
curl -X GET \
https://api.weav.cloud/user/${uid}/profile_image \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/profile_image - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- profile_image: String, Http link to the users photo
- Content-Type:
Get Education
curl -X GET \
https://api.weav.cloud/user/${uid}/education \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/education - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- education: String, A short description of the users education
- Content-Type:
Get About me
curl -X GET \
https://api.weav.cloud/user/${uid}/about_me \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/about_me - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- about_me: String, A short description of the User
- Content-Type:
Get Occupation
curl -X GET \
https://api.weav.cloud/user/${uid}/occupation \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/occupation - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- occupation String, A short descriptions of the users occupation
- Content-Type:
Get Vehicles
curl -X GET \
https://api.weav.cloud/user/${uid}/vehicles \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/vehicle/:license - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- vehicles: List of Objects, the list of vehicles the user has registered
- _id: String, The license of the vehicle
- model: String, The Model of the car
- make: String, The make of the car
- year: String, The year of the car
- images: List of Strings, A list of images of the car
- Content-Type:
Get Vehicle
curl -X GET \
https://api.weav.cloud/user/${uid}/vehicle/${license} \
-H 'Authorization: ${token}' \
-H 'uid: ${uid}'
- Description: Read the entire user object
- Request:
GET /user/:id/birth_date - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- vehicles: Object, the vehicle the user has registered
- _id: String, The license of the vehicle
- model: String, The Model of the car
- make: String, The make of the car
- year: String, The year of the car
- images: List of Strings, A list of images of the car
- Content-Type:
Get Default Vehicle
curl -X GET \
https://api.weav.cloud/user/${uid}/default-vehicle \
-H 'Authorization: ${token}'
- Description: Read the default vehicle object
- Request:
GET /user/:id/default-vehicle - Headers:
- Authorization: Bearer Token
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, The license of the default vehicle
- model: String, The Model of the car
- make: String, The make of the car
- year: String, The year of the car
- images: List of Strings, A list of images of the car
- Content-Type:
Edit User
- Description: Edit the Profile of the user
- Request:
PATCH /user/:id- Content-Type:
application/json- birth_date: Number, The birthdate of the user in Epoch format
- email: String, The email of the user
- phone: String, The phone number of the user
- user_first: String, The first name of the user
- user_last: String, The last name of the user
- education: String, A short description of the users education
- about_me: String, A short description of the User
- occupation String, A short descriptions of the users occupation
- vehicles: List of Objects, the list of vehicles the user has registered
- _id: String, The license of the vehicle
- model: String, The Model of the car
- make: String, The make of the car
- year: String, The year of the car
- images: List of Strings, A list of images of the car
- Body object
- Content-Type:
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, A unique user id in unique ObjectId format
- birth_date: Number, The birthdate of the user in Epoch format
- email: String, The email of the user
- phone: String, The phone number of the user
- user_first: String, The first name of the user
- user_last: String, The last name of the user
- profile_image: String, Http link to the users photo
- education: String, A short description of the users education
- about_me: String, A short description of the User
- occupation String, A short descriptions of the users occupation
- vehicles: List of Objects, the list of vehicles the user has registered
- _id: String, The license of the vehicle
- model: String, The Model of the car
- make: String, The make of the car
- year: String, The year of the car
- images: List of Strings, A list of images of the car
- posts: List of Objects, the list of posts the user has made
- _id: String, A unique user id in ObjectId format
- matched: Boolean, a Boolean representing whether or not the post has matches
- depart_time: Number, the epoch time stamp representing the time the post starts or is supposed to start
- depart_location: Object
- city: String, the city the post starts at
- latitude: Number, The latitude the post starts at
- longitude: Number, The longitude the post starts at
- destination_location: Object
- city: String, the city the post starts at
- latitude: Number, The latitude the post starts at
- longitude: Number, The longitude the post starts at
- relation: String, The relation of the user to the post "driver", "requester", "rider", "booked driver"
- type: String, String for whether the post is for a "request" or "ride"
- rides_taken: Number, The number of rides the user has taken
- rides_given: Number, The number of rides the user has given
- rating: Number, The rating of the user
- number_of_reviews; Number, the number of reviews on this user
- Content-Type:
Set Default Vehicle
curl -X PATCH \
https://api.weav.cloud/user/${uid}/default-vehicle \
-H 'Authorization: ${token}'
- Description: Set the default vehicle
- Request:
PATCH /user/:id/default-vehicle- Content-Type:
application/json- default_vehicle: String, The license of the default vehicle
- Content-Type:
- Headers:
- Authorization: Bearer Token
- Response: 200
- Content-Type:
application/json - body: User object
- Content-Type:
Upload Profile image
- Description: Edit the Profile of the user
- Request:
PUT /user/:id/profile_image
- Content-Type:
multipart/form-data - Body: Form Data
- profile_image: Image, An image of the vehicle
- profile_image: Image, An image of the vehicle
- Content-Type:
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, A unique user id in unique ObjectId format
- birth_date: Number, The birthdate of the user in Epoch format
- email: String, The email of the user
- phone: String, The phone number of the user
- user_first: String, The first name of the user
- user_last: String, The last name of the user
- profile_image: String, Http link to the users photo
- education: String, A short description of the users education
- about_me: String, A short description of the User
- occupation String, A short descriptions of the users occupation
- vehicles: List of Objects, the list of vehicles the user has registered
- _id: String, The license of the vehicle
- model: String, The Model of the car
- make: String, The make of the car
- year: String, The year of the car
- images: List of Strings, A list of images of the car
- posts: List of Objects, the list of posts the user has made
- _id: String, A unique user id in ObjectId format
- matched: Boolean, a Boolean representing whether or not the post has matches
- depart_time: Number, the epoch time stamp representing the time the post starts or is supposed to start
- depart_location: Object
- city: String, the city the post starts at
- latitude: Number, The latitude the post starts at
- longitude: Number, The longitude the post starts at
- destination_location: Object
- city: String, the city the post starts at
- latitude: Number, The latitude the post starts at
- longitude: Number, The longitude the post starts at
- relation: String, The relation of the user to the post "driver", "requester", "rider", "booked driver"
- type: String, String for whether the post is for a "request" or "ride"
- rides_taken: Number, The number of rides the user has taken
- rides_given: Number, The number of rides the user has given
- rating: Number, The rating of the user
- number_of_reviews; Number, the number of reviews on this user
- Content-Type:
Add Vehicle
- Description: Add a vehicle; Set vehicle as default vehicle if there are no default vehicles
- Request:
PUT /user/:id/vehicle- Content-Type:
multipart/form-data - Body: Form Data
- model: String, The model of the vehicle
- year: Number, The year of the vehicle
- make: String, The make of the vehicle
- license: String, The license of the vehicle
- vehicle_image: Image, An image of the vehicle
- Content-Type:
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, A unique user id in unique ObjectId format
- birth_date: Number, The birthdate of the user in Epoch format
- email: String, The email of the user
- phone: String, The phone number of the user
- user_first: String, The first name of the user
- user_last: String, The last name of the user
- profile_image: String, Http link to the users photo
- education: String, A short description of the users education
- about_me: String, A short description of the User
- occupation String, A short descriptions of the users occupation
- vehicles: List of Objects, the list of vehicles the user has registered
- _id: String, The license of the vehicle
- model: String, The Model of the car
- make: String, The make of the car
- year: String, The year of the car
- images: List of Strings, A list of images of the car
- posts: List of Objects, the list of posts the user has made
- _id: String, A unique user id in ObjectId format
- matched: Boolean, a Boolean representing whether or not the post has matches
- depart_time: Number, the epoch time stamp representing the time the post starts or is supposed to start
- depart_location: Object
- city: String, the city the post starts at
- latitude: Number, The latitude the post starts at
- longitude: Number, The longitude the post starts at
- destination_location: Object
- city: String, the city the post starts at
- latitude: Number, The latitude the post starts at
- longitude: Number, The longitude the post starts at
- relation: String, The relation of the user to the post "driver", "requester", "rider", "booked driver"
- type: String, String for whether the post is for a "request" or "ride"
- rides_taken: Number, The number of rides the user has taken
- rides_given: Number, The number of rides the user has given
- rating: Number, The rating of the user
- number_of_reviews; Number, the number of reviews on this user
- Content-Type:
External Post-Service
Post Request information
- Request:
POST /postservice/graphql- query: String, the GraphQL query string
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Return Object: The object matching the return schema requested
- Content-Type:
Ride Return Schema
- id: String ObjectID,The id of the ride
- driver: User object for driver
- _id: ObjectID,The id of the driver
- user_first: GraphQLString, The first name of the driver
- user_last: GraphQLString, The last name of the driver
- profile_image: GraphQLString, The profile image of the driver
- rating: GraphQLInt, The rating of the driver
- number_of_reviews: GraphQLFloat, The number of reviews on the driver
- driver_price: GraphQLFloat, The price of the ride set by the driver
- seats: GraphQLInt, The number of seats available in the ride
- luggage: GraphQLInt, The amount of luggage space available in the ride
- depart_time: GraphQLInt, The depart time of the ride set by the driver
- route_points: List of Route_point Objects, The list of route points along the ride
- time: GraphQLInt, The estimated time the ride will arrive at the route point
- location: Location Object, The location the route point happens
- latitude: GraphQLFloat, The latitude of the route point
- longitude: GraphQLFloat, The longitude of the route point
- address: GraphQLString, The street address of the route point
- city: GraphQLString, The city of the route points
- province: GraphQLString, The province of the route point
- passenger_joining: String, ID of passenger joining at this route point (null if drop off location)
- passenger_leaving: String, ID of passenger joining at this route point (null if pick up location)
- depart_location: Location Object, The depart location of the ride
- latitude: GraphQLFloat, The latitude of the depart location
- longitude: GraphQLFloat, The longitude of the depart location
- address: GraphQLString, The street address of the depart location
- city: GraphQLString, The city of the depart location
- province: GraphQLString, The province of the depart location
- destination_location: Location Object, The destination location of the ride
- latitude: GraphQLFloat, The latitude of the destination location
- longitude: GraphQLFloat, The longitude of the destination location
- address: GraphQLString, The street address of the destination location
- city: GraphQLString, The city of the destination location
- province: GraphQLString, The province of the destination location
- passengers: List of Passenger Objects, The list of passengers in the ride
- _id: GraphQLString, The id of the user being picked up or dropped off
- user_first: GraphQLString,The first name of the passenger
- user_last: GraphQLString, The last name of the passenger
- profile_image: GraphQLString, The http link to the passenger profile image
- seats: GraphQLInt, The number of setas the passenger requires
- luggage: GraphQLInt, The amount of luggage the passenger requires
- vehicle: Vehicle Object, The Vehicle in the ride
- _id: GraphQLString, The license of the vehicle
- model: GraphQLString, The Model of the car
- make: GraphQLString, The make of the car
- year: GraphQLString, The year of the car
- images: List of GraphQLString, A list of images of the car
- matched: GraphQLBoolean, whether or not the ride has a match
- booked: GraphQLBoolean, whether the ride is booked or not
Request Return Schema
- id: ObjectID, The id of the request
- requester: Requester Object, The user object of the requester
- _id: ObjectID,The id of the requester
- user_first: GraphQLString, The first name of the requester
- user_last: GraphQLString, The last name of the requester
- profile_image: GraphQLString, The profile image of the requester
- rating: GraphQLInt, The rating of the requester
- number_of_reviews: GraphQLFloat, The number of reviews on the requester
- depart_time: GraphQLInt, The depart time the requester wants
- depart_location: Location Object, The depart location of the request
- latitude: GraphQLFloat, The latitude of the depart location
- longitude: GraphQLFloat, The longitude of the depart location
- address: GraphQLString, The address of the depart location
- city: GraphQLString, The city of the depart location
- province: GraphQLString, The province of the depart location
- destination_location: Location Object, The destination location of the request
- latitude: GraphQLFloat, The latitude of the depart location
- longitude: GraphQLFloat, The longitude of the depart location
- address: GraphQLString, The address of the depart location
- city: GraphQLString, The city of the depart location
- province: GraphQLString, The province of the depart location
- seats: GraphQLInt, The Seats the requester needs
- luggage: GraphQLInt, The luggage the requester need
- time_range: GraphQLInt, The time range the requester has
- booked: GraphQLBoolean, True if the request is booked
- matched: GraphQLBoolean, Whether or not the request has a match
- type: GraphQLString, The type of the post "request"
Add Ride Mutation Schema
- uid: ObjectID GraphQLString, The id of the driver of the ride
- driver_price: GraphQLFloat, The price of the drive set by the driver
- seats: GraphQLInt, The number of seats available in the ride
- luggage: GraphQLInt, The luggage space available in the ride
- depart_location: Location Object, The Depart location of the ride
- latitude: GraphQLFloat, The latitude of the depart location
- longitude: GraphQLFloat, The longitude of the depart location
- address: GraphQLString, The address of the depart location
- city: GraphQLString, The city of the depart location
- province: GraphQLString, The province of the depart location
- destination_location: Location Object, The Destination location of the ride
- latitude: GraphQLFloat, The latitude of the destination location
- longitude: GraphQLFloat, The longitude of the destination location
- address: GraphQLString, The address of the destination location
- city: GraphQLString, The city of the destination location
- province: GraphQLString, The province of the destination location
- depart_time: GraphQLInt, The time the ride is going to depart
- destination_time: GraphQLInt, The estimated time the ride is going to arrive
- vehicle_id: GraphQLString, The id of vehicle the ride is happening in
Add Request Mutation Schema
- uid: ObjectID GraphQLString, The id of the driver of the requester
- depart_location: Location Object, The Depart location of the requester
- latitude: GraphQLFloat, The latitude of the depart location
- longitude: GraphQLFloat, The longitude of the depart location
- address: GraphQLString, The address of the depart location
- city: GraphQLString, The city of the depart location
- province: GraphQLString, The province of the depart location
- destination_location: Location Object, The Destination location of the requester
- latitude: GraphQLFloat, The latitude of the destination location
- longitude: GraphQLFloat, The longitude of the destination location
- address: GraphQLString, The address of the destination location
- city: GraphQLString, The city of the destination location
- province: GraphQLString, The province of the destination location
- depart_time: GraphQLInt, The time the request is going to depart
- time_range: GraphQLInt, The time range the requester has
- seats: GraphQLInt, The Seats the requester needs
- luggage: GraphQLInt, The luggage the requester need
Edit Ride Mutation Schema
- id: ObjectID, The id of the ride
- seats: GraphQLInt, The number of seats available in the ride
- luggage: GraphQLInt, The luggage space available in the ride
- vehicle_id: GraphQLString, The id of vehicle the ride is happening in
Edit Request Mutation Schema
- id: ObjectID, The id of the request
- depart_location: Location Object, The Depart location of the requester
- latitude: GraphQLFloat, The latitude of the depart location
- longitude: GraphQLFloat, The longitude of the depart location
- address: GraphQLString, The address of the depart location
- city: GraphQLString, The city of the depart location
- province: GraphQLString, The province of the depart location
- destination_location: Location Object, The Destination location of the requester
- latitude: GraphQLFloat, The latitude of the destination location
- longitude: GraphQLFloat, The longitude of the destination location
- address: GraphQLString, The address of the destination location
- city: GraphQLString, The city of the destination location
- province: GraphQLString, The province of the destination location
- depart_time: GraphQLInt, The time the request is going to depart
- time_range: GraphQLInt, The time range the requester has
- luggage_available: GraphQLInt, The luggage space available in the ride
- vehicle_id: GraphQLString, The id of vehicle the ride is happening in
Delete Ride Mutation Schema
- id: ObjectID, The id of the ride
Delete Request Mutation Schema
- id: ObjectID, The id of the request
Notifications Posted
- RIDE_CREATED - Posted during Add Ride Mutation
- data: object
- type: "RIDE_CREATED"
- title: "Your Ride Was Created"
- body: "We will notify you once we find matches."
- rideId: ""
- data: object
- REQUEST_CREATED - Posted during Add Request Mutation
- data: object
- type: "REQUEST_CREATED"
- title: "Your Request Was Created"
- body: "We will notify you once we find matches."
- requestId: ""
- data: object
External Review-Service
Link to Docs
https://dev.weav.cloud/review/docs
External Match-List-Service
Get Ride Match
- Description: Read the next Ride Match
- Request:
GET /match-list/ride/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- ride: Object - Ride associated with the match, includes sorted route_points from the request
- request: Object- Request associated with the match
- driver_accpeted: Integer - 0 (Neither Accepted nor Declined), 1 (Accepted), 2 (Declined)
- rider_accepted: Integer - 0 (Neither Accepted nor Declined), 1 (Accepted), 2 (Declined)
- Content-Type:
Get Request Match
- Description: Read the next Request Match
- Request:
GET /match_list/ride/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- ride: Object - Ride associated with the match, includes sorted route_points from the request
- request: Object- Request associated with the match
- driver_accpeted: Integer - 0 (Neither Accepted nor Declined), 1 (Accepted), 2 (Declined)
- rider_accepted: Integer - 0 (Neither Accepted nor Declined), 1 (Accepted), 2 (Declined)
- Content-Type:
Accept Match
- Description: Read the entire user object
- Request:
POST /match-list/accept/:id?role="rider/driver" - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200 "Joined Ride"
- Response: 200 "waiting for other user to accept"
Decline Match
- Description: Read the entire user object
- Request:
POST /match-list/decline/:id?role="rider/driver" - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200 "ok"
Notifications Posted
- RIDE_ACCEPTED - Sent to driver when rider joins a ride
- data: object
- type: "RIDE_ACCEPTED"
- title: "Your Ride Has Been Accepted"
- body: "{{rider name's}} has joined your ride"
- rideId: ""
- requestId: ""
- uid: ""
- data: object
- REQUEST_ACCEPTED - Sent to rider when driver accepts request
- data: object
- type: "REQUEST_ACCEPTED"
- title: "Your Request Has Been Accepted"
- body: "You have joined {{driver name's}} ride"
- rideId: ""
- requestId: ""
- uid: ""
- data: object
- RIDE_MATCHED - Sent to driver when a match was found
- data: object
- type: "RIDE_MATCHED"
- title: "Your Ride Has a Match"
- body: "We found matches for your ride. Open the app to accept."
- rideId: ""
- data: object
- REQUEST_MATCHED - Sent to rider when a match was found
- data: object
- type: "REQUEST_MATCHED"
- title: "Your Request Has a Match"
- body: "We found matches for your request. Open the app to accept."
- requestId: ""
- data: object
External Messaging Service
Post Request information
- Request:
POST /messages/graphql- query: String, the GraphQL query string
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Return Object: The object matching the return schema requested
- Content-Type:
CreateMessage Mutation Schema
mutation CreateMessage(
$conversation_id: String!,
$author: String!,
$body: String!) {
createMessage(
conversation_id: $conversation_id,
author: $author,
body: $body) {
...returnMessage
}
}
// Query Variables
{
"conversation_id": "",
"author": "",
"body": ""
}
- conversation_id: ObjectID GraphQLString, The id of the conversation
- author: ObjectID GraphQLString, The id of the user sending the message
- body: ObjectID GraphQLString, The body (message) to be sent
DeleteMessage Mutation Schema
mutation DeleteMessage(
$message_id: String!) {
deleteMessage(
message_id: $message_id)
}
// Query Variables
{
"message_id": ""
}
- message_id: ObjectID GraphQLString, The id of the message to delete
MessageAddedSubscription Schema
subscription MessageAddedSubscription($conversation_id: String!) {
messageAdded(conversation_id: $conversation_id) {
...returnMessage
}
}
// Query Variables
{
"conversation_id": ""
}
- conversation_id: ObjectID GraphQLString, The id of the conversation to subscribe to
Query Conversation
query conversation($ride_id: String!){
conversation(ride_id: $ride_id){
participants{
_id
user_first
user_last
profile_image
seats
luggage
}
_id
}
}
// Query Variables
{
"ride_id": "",
}
- ride_id: ObjectID GraphQLString, The id of the ride
Notifications Posted
External Enroute-Service
Get Enroute Ride
curl -X GET \
https://api.weav.cloud/enroute/$id \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Get the enroute object
- Request:
GET /enroute/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, A unique ride id in unique ObjectId format
- step: Number, The current step in the route
- action: Number, The current action to take in the current step
- routePoints: List of Tuples, each tuple contains two lists, a list of drop off route points and a list of pick up route points
- time: GraphQLInt, The estimated time the ride will arrive at the route point
- location: Location Object, The location the route point happens
- latitude: GraphQLFloat, The latitude of the route point
- longitude: GraphQLFloat, The longitude of the route point
- address: GraphQLString, The street address of the route point
- city: GraphQLString, The city of the route points
- province: GraphQLString, The province of the route point
- passenger_joining: String, ID of passenger joining at this route point (null if drop off location)
- passenger_leaving: String, ID of passenger joining at this route point (null if pick up location)
- statuses: List of Objects, the list of enroute statuses
- uid: String, A unique user id in unique ObjectId format
- type: Number, the type of action
- time: Number, the time the action occurred
- success: Boolean, representing whether the action was successful
- rideEnded: Boolean, representing whether the ride had ended
- lastArrivalTime: Number, driver's time of arrival at the most recent "pick up" route point
- Content-Type:
Get Driver Indication
curl -X GET \
https://api.weav.cloud/enroute/$id/indicated \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Whether driver has indicated their arrival
- Request:
GET /enroute/:id/indicated - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200 - Boolean variable, true if they have indicated arrival
Start Enroute Ride
curl -X POST \
https://api.weav.cloud/enroute/start-ride \
-H 'Authorization: $token' \
-H 'uid: $uid' \
-D '{ "rideId": "47af541b-031e-429a-86b5-3784ef21402a" }'
- Description: Begin enroute
- Request:
POST /enroute/start-ride - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Body:
- rideId: String, A unique ride id in unique ObjectId format
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, A unique ride id in unique ObjectId format
- step: Number, The current step in the route
- action: Number, The current action to take in the current step
- routePoints: List of Tuples, each tuple contains two lists, a list of drop off route points and a list of pick up route points
- time: GraphQLInt, The estimated time the ride will arrive at the route point
- location: Location Object, The location the route point happens
- latitude: GraphQLFloat, The latitude of the route point
- longitude: GraphQLFloat, The longitude of the route point
- address: GraphQLString, The street address of the route point
- city: GraphQLString, The city of the route points
- province: GraphQLString, The province of the route point
- passenger_joining: String, ID of passenger joining at this route point (null if drop off location)
- passenger_leaving: String, ID of passenger joining at this route point (null if pick up location)
- statuses: List of Objects, the list of enroute statuses
- uid: String, A unique user id in unique ObjectId format
- type: Number, the type of action
- time: Number, the time the action occurred
- success: Boolean, representing whether the action was successful
- rideEnded: Boolean, representing whether the ride had ended
- lastArrivalTime: Number, driver's time of arrival at the most recent "pick up" route point
- Content-Type:
Arrived
curl -X PATCH \
https://api.weav.cloud/enroute/arrived/:id \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Arrived at a location
- Request:
PATCH /enroute/arrived/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Body:
- rideId: String, A unique ride id in unique ObjectId format
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, A unique ride id in unique ObjectId format
- step: Number, The current step in the route
- action: Number, The current action to take in the current step
- routePoints: List of Tuples, each tuple contains two lists, a list of drop off route points and a list of pick up route points
- time: GraphQLInt, The estimated time the ride will arrive at the route point
- location: Location Object, The location the route point happens
- latitude: GraphQLFloat, The latitude of the route point
- longitude: GraphQLFloat, The longitude of the route point
- address: GraphQLString, The street address of the route point
- city: GraphQLString, The city of the route points
- province: GraphQLString, The province of the route point
- passenger_joining: String, ID of passenger joining at this route point (null if drop off location)
- passenger_leaving: String, ID of passenger joining at this route point (null if pick up location)
- statuses: List of Objects, the list of enroute statuses
- uid: String, A unique user id in unique ObjectId format
- type: Number, the type of action
- time: Number, the time the action occurred
- success: Boolean, representing whether the action was successful
- rideEnded: Boolean, representing whether the ride had ended
- lastArrivalTime: Number, driver's time of arrival at the most recent "pick up" route point
- Content-Type:
Update Enroute Ride
curl -X PATCH \
https://api.weav.cloud/enroute/update-ride/:id \
-H 'Authorization: $token' \
-H 'uid: $uid'
-D '{
"time": 1581968021,
"success": "true",
}'
- Description: Update the status of the ride
- Request:
PATCH /enroute/update-ride/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Body:
- time: Number, the time the action occurred
- success: Boolean, representing whether the action was successful
- Response: 200
- Content-Type:
application/json - body: object
- _id: String, A unique ride id in unique ObjectId format
- step: Number, The current step in the route
- action: Number, The current action to take in the current step
- routePoints: List of Tuples, each tuple contains two lists, a list of drop off route points and a list of pick up route points
- time: GraphQLInt, The estimated time the ride will arrive at the route point
- location: Location Object, The location the route point happens
- latitude: GraphQLFloat, The latitude of the route point
- longitude: GraphQLFloat, The longitude of the route point
- address: GraphQLString, The street address of the route point
- city: GraphQLString, The city of the route points
- province: GraphQLString, The province of the route point
- passenger_joining: String, ID of passenger joining at this route point (null if drop off location)
- passenger_leaving: String, ID of passenger joining at this route point (null if pick up location)
- statuses: List of Objects, the list of enroute statuses
- uid: String, A unique user id in unique ObjectId format
- type: Number, the type of action
- time: Number, the time the action occurred
- success: Boolean, representing whether the action was successful
- rideEnded: Boolean, representing whether the ride had ended
- lastArrivalTime: Number, driver's time of arrival at the most recent "pick up" route point
- Content-Type:
External History-Service
Get Archived Ride
curl -X GET \
https://api.weav.cloud/history/ride/$id \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Get the archived ride object
- Request:
GET /history/ride/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: ride object
- Content-Type:
Get Archived Request
curl -X GET \
https://api.weav.cloud/history/request/$id \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Get the archived request object
- Request:
GET /history/request/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: request object
- Content-Type:
Get Archived Posts
curl -X GET \
https://api.weav.cloud/history/posts/$id \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Get archived post objects
- Request:
GET /history/posts/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: list of post objects
- Content-Type:
Archive
curl -X PATCH \
https://api.weav.cloud/history/archive/:type/:id \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Archive a ride/request
- Request:
PATCH /history/archive/:type/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: object (either ride or request)
- Content-Type:
External Payouts Service
Get Hyperwallet User
- Description: Get the Hyperwallet User if they Exist
- Request:
GET /payouts/:uid - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Hyperwallet User Object (see hyperwallet docs - https://portal.hyperwallet.com/docs/api/v3/resources/users/retrieve)
- Content-Type:
- Response: 404 - User does not exist in Hyperwallet DB
Get Transfer Methods
- Description: Get the registered payout methods for a hyperwallet user (if any) if they exists
- Request:
GET /payouts/:uid/transfer-methods - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - List of Hyperwallet Bank Account Objects (see hyperwallet docs - https://portal.hyperwallet.com/docs/api/v3/resources/bank-accounts/retrieve)
- Content-Type:
- Response: 404 - User does not exist in Hyperwallet DB
Create Hyperwallet User
- Description: Creates Hyperwallet user from Weav User
- Request:
POST /payouts/:uid- body: application/json
- address: String - Address line (e.g. 1234 Home Rd)
- city: String - City Name (e.g. Toronto)
- province: String - Province Short Form (e.g. ON)
- postalCode: string - Postal Code With No Spaces (A1B2C3)
- body: application/json
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Hyperwallet User Object (see hyperwallet docs - https://portal.hyperwallet.com/docs/api/v3/resources/users/retrieve)
- Content-Type:
- Response: 304
- User already exists
- Response: 404
- Weav user with id {uid} does not exist
Create Transfer Method
- Description: Creates Hyperwallet user from Weav User
- Request:
POST /payouts/:uid/transfer-method- body: application/json
- bankId: String - 3 digit Institution number on TD direct deposit form
- branchId: String - 5 digit Transit number on TD direct deposit form
- bankAccountId: String - Account number on TD direct deposit form
- body: application/json
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Hyperwallet Bank Account Object (see hyperwallet docs - https://portal.hyperwallet.com/docs/api/v3/resources/bank-accounts/retrieve)
- Content-Type:
- Response: 404
- Weav/Hyperwallet user with id {uid} does not exist
Create Payout
- Description: Creates Hyperwallet user from Weav User
- Request:
POST /payouts/:uid/payout- body: application/json
- destinationToken: String - Token from
Create Payment Method
- destinationToken: String - Token from
- body: application/json
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Hyperwallet Payment Object (see hyperwallet docs - https://portal.hyperwallet.com/docs/api/v3/resources/payments/create)
- Content-Type:
- Response: 404
- Weav/Hyperwallet user with id {uid} does not exist
Patch User
- Description: Creates Hyperwallet user from Weav User
- Request:
PATCH /payouts/:uid/address - body: application/json
- address: String - Address line (e.g. 1234 Home Rd)
- city: String - City Name (e.g. Toronto)
- province: String - Province Short Form (e.g. ON)
- postalCode: string - Postal Code With No Spaces (A1B2C3)
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Hyperwallet Payment Object (see hyperwallet docs - https://portal.hyperwallet.com/docs/api/v3/resources/payments/create)
- Response: 404
- Weav/Hyperwallet user with id {uid} does not exist
- Request:
External Payments Service
GET Payment Methods
- Description: Get the payment methods for the braintree user
- Request:
GET /payments/payment-methods/:uid - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Array of Braintree Payment Method Object (see braintree docs - https://developers.braintreepayments.com/reference/response/payment-method/node)
- Content-Type:
PATCH Make Payment Method Default
- Description: Get the registered payout methods for a hyperwallet user (if any) if they exists
- Request:
PATCH /payments/payment-methods/:uid/make-default/:paymentMethodToken - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Params
- paymentMethodToken: Token for the payment method (can be obtained frome
Get Payment Methodscall)
- paymentMethodToken: Token for the payment method (can be obtained frome
- Response: 200
- Content-Type:
application/json - Single Braintree Payment Method Object (see braintree docs - https://developers.braintreepayments.com/reference/response/payment-method/node)
- Content-Type:
POST Client Token
- Description:
- Request:
POST /payments/client-token - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Briantree Client Token Object
- Content-Type:
External Transaction Service
Enums
- TransactionType
- 0: Ride
- 1: Cancellation
- 2: Refund
- TransactionStatus
- 0: AwaitingPayment = The transaction has not recieved payment (Join ride)
- 1: InEscrow = We have recieved payment for the transaction but it cannot be payed out yet (Ride booked)
- 2: Released = The transaction is now elegible for payout (Ride completed)
- 3: Fulfilled = The transaction has been paid out
- 4: Void = The transaction was cancelled for whatever reason
GET Receipt for ride
- Description: Get the current receipt for the ride
- Request:
GET /ride/:rideId/receipt/:uid - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: Transaction
- amount: number
- payeeId: string
- payerId: string
- rideId: string
- purpose: TransactionType
- status: TransactionStatus
- Content-Type:
GET Balance for user
- Description: Get the current balance for the user
- Request:
GET /balance/:uid - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - body: Object
- userId: string
- total: number (amountIn - amountOut)
- amountIn: number (total value of transactionsIn)
- amountOut: number (total value of transactionsOut)
- transactionsOut: Transaction
- transactionsIn: Transaction
- Content-Type:
PATCH Make Payment Method Default
- Description: Get the registered payout methods for a hyperwallet user (if any) if they exists
- Request:
PATCH /payments/payment-methods/:uid/make-default/:paymentMethodToken - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Params
- paymentMethodToken: Token for the payment method (can be obtained frome
Get Payment Methodscall)
- paymentMethodToken: Token for the payment method (can be obtained frome
- Response: 200
- Content-Type:
application/json - Single Braintree Payment Method Object (see braintree docs - https://developers.braintreepayments.com/reference/response/payment-method/node)
- Content-Type:
Create Hyperwallet User
- Description: Creates Hyperwallet user from Weav User
- Request:
POST /payouts/:uid- body: application/json
- address: String - Address line (e.g. 1234 Home Rd)
- city: String - City Name (e.g. Toronto)
- province: String - Province Short Form (e.g. ON)
- postalCode: string - Postal Code With No Spaces (A1B2C3)
- body: application/json
- Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Hyperwallet User Object (see hyperwallet docs - https://portal.hyperwallet.com/docs/api/v3/resources/users/retrieve)
- Content-Type:
- Response: 304
- User already exists
- Response: 404
- Weav user with id {uid} does not exist
POST Client Token
- Description:
- Request:
POST /payments/client-token - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - Briantree Client Token Object
- Content-Type:
External Weav-Link-Service
Generate Link
curl -X GET \
https://dev.weav.cloud/weav-link/generate-link/$id \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Generate a link based on ride id and time
- Request:
GET /weav-link/generate-link/:id - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- URL in the form of https://letsweav.com/join-ride/xxx
Verify Link
curl -X GET \
https://dev.weav.cloud/weav-link/verify-link/$token \
-H 'Authorization: $token' \
-H 'uid: $uid'
- Description: Generate a link based on ride id and time
- Request:
GET /weav-link/verify-link/:token - Headers:
- Authorization: Bearer Token
- uid: unique ObjectId of the user making the call
- Response: 200
- Content-Type:
application/json - rideId: id of the ride
- Content-Type:
Internal User-Service
Edit Rating
Create User
Internal Post-Service
Add Rider to Ride
Internal Review-Service
Delete Reviews
Internal Match-List-Service
Get Match-List
Get Number of Matches
Update Match-List
Create new Request Match-List
Create new Ride Match-List
Add new Match
Delete Match-List
Internal Device ID Service
Description
A set of internal routes for creating and managing the device ids necessary for sending notifications to Android and iOS devices.
Testing
You can use the npm run test command to automatically execute a series of unit tests on the service. These tests write to the "Auth-Test-Cluster" under the "Weav-Test" project. Currently includes tests for device id creation, retrieveal and deletion.
Get All Device IDs for User
- Description: Retrieves all currently registered device-ids for the provided userID
- Request:
GET /device-id/:userID - Headers: None
- Response: 200
- Content-Type:
application/json - Body: Object
- NOTE: This object is still returned even if the user does not exist or has no device ids registered
- uid: String, the provided user-id, for which the device ids within device-list were registered
- deviceIds: [String], array of all device-ids registered to uid
- Content-Type:
- Response: 500
- If an error occurs during retrieval of user's device-ids status code 500 is returned
Register Device ID to User
- Description: Registers new device-id to provided userID. Intended to be called during log-in process.
- Request:
PUT /device-id/:userID/:deviceID?type={TYPE}(device-ids must be unique)- TYPE: String Enum ("ANDROID" or "IOS") - the type of device to be registered, must be one of the two provided values
- Headers: None
- Response: 200
- Content-Type:
application/json - Body: Object
- uid: String, the provided user-id, for which the device-id will be registered
- did: String, the provided device-id which has been registered to the provided user-id
- Content-Type:
- Response: 500
- If an error occurs during registering of device-id status code 500 is returned
Delete Device ID
- Description: Deletes a single device-id for the provided user-id
- Request:
PUT /device-id/:userID/:deviceID(device-ids must be unique) - Headers: None
- Response: 200
- Content-Type:
application/json - Body: Object
- deletedCount: Int, number of items deleted during operation (either 0 or 1)
- Content-Type:
- Response: 500
- If an error occurs during deletion of device-id status code 500 is returned
Delete All Device IDs for User
- Description: Deletes all device-ids registered to the provided user-id
- Request:
PUT /device-id/:userID - Headers: None
- Response: 200
- Content-Type:
application/json - Body: Object
- deletedCount: Int, number of items deleted during operation
- Content-Type:
- Response: 500
- If an error occurs during deletion of device-ids status code 500 is returned
Errors
The Weav API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 401 | Unauthorized -- Your API key is wrong. |
| 403 | Forbidden -- The resource requested is not able to be accessed from you user. |
| 404 | Not Found -- The specified resource could not be found. |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |