Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Get profile data
- This method is used for the user want to get all information
- API Path
- Endpoint
- Method
- /customer/{version}/customers/{customerId} GET
- Parameters
- Description
- Parameter
- Type
- Mandatory
- Notes
- accessToken String x Include in header
- customerId Number x Path (id of customer)
- Example
- GET /customer/v1/customers/342345
- Response
- Description
- Response
- Type
- Notes
- <top_level> Customer
- Example
- {
- "id": 342345,
- "loginType": "EMAIL",
- "email": "leduchieu02@gmail.com",
- "password": null,
- "accessToken": "2eca82f2-a5e6-4f23-80c6-8fcd54ea4416",
- "expireDate": [2018, 1, 12, 16, 58, 24, 367000000],
- "activate": true,
- "accessTokenEmail": "4d5562f9-0a41-4532-8b4a-39b6e12da597",
- "expireDateEmail": [2017, 1, 13, 16, 40, 34, 406000000],
- "firstName": null,
- "lastName": null,
- "socialNetwork": {
- "socialId": null,
- "socialToken": null,
- "profilePictureUrl": null
- },
- "fiscalCode": null,
- "phoneNumber": "+84901876372",
- "optinMarketing": false,
- "optinThirdParty": false,
- "optinProfiling": false,
- "contactInfos": [
- {
- "id": 45,
- "email": "test1@gmail.com",
- "phoneNumber": "+3325658878"
- },
- {
- "id": 46,
- "email": "test2@gmail.com",
- "phoneNumber": "+3325634778"
- }
- ],
- "vehicles": [
- {
- "id": 56,
- "name": "KIA Rio2",
- "plateNumber": "KZ-2809",
- "model": "KIA",
- "make": "Rio",
- "details": "1.6 TDCi DPF SW 5p/d/1560cc",
- "modelYear": 2017
- },
- {
- "id": 57,
- "name": "KIA Rio3",
- "plateNumber": "KZ-2809",
- "model": "KIA",
- "made": "Rio",
- "details": "1.6 TDCi DPF SW 5p/d/1560cc",
- "modelYear": 2014
- }
- ],
- "locationInfos": [
- {
- "id": 78,
- "name": "Home",
- "address": "Neon Street, 34",
- "postalCode": "80001",
- "latitude": 48.209,
- "longitude": 15.23568795
- },
- {
- "id": 79,
- "name": "Company",
- "address": "Neon Street, 34",
- "postalCode": "80001",
- "latitude": 48.209,
- "longitude": 15.23568795
- }
- ]
- }
- Error example
- {
- "code":"ERR_CUS_000"
- }
- Available Status
- Code
- Note
- 200 User found
- 404 User not found
- 400 missing param, wrong param, etc...
- Operation rules
- Operation rules
- Description
- Internal Error Code
- Error Description
- Change password
- This method is used for user want to change his/her password.
- API Path
- Endpoint
- Method
- /customer/{version}/customers/{customerId}/changePassword POST
- Parameters
- Parameter
- Type
- Mandatory
- Notes
- accessToken String x Include in header
- customerId Number x Path (Id of customer)
- oldPassword String x Body
- newPassword String x Body
- Body example
- {
- "oldPassword": "old_password",
- "newPassword": "new_password"
- }
- Update general information of customer
- This method is used for the user want to update his/her profile (name, phone,...)
- API Path
- Endpoint
- Method
- /customer/{version}/customers/{customerId}/general POST
- Path example
- /customer/v1/customers/5678/general
- Parameters
- Description
- Parameter
- Type
- Mandatory
- Notes
- accessToken String x Include in header
- customerId Number x Path (id of customer)
- lastName String x Body
- firstName String x Body
- email String x Body
- phoneNumber String x Body
- Body Example
- {
- "lastName": "My last name",
- "firstName": "My first name",
- "email": "my email",
- "phoneNumber": "+3365464646"
- }
- Response
- Description
- Response
- Type
- Notes
- Example
- Error example
- {
- "code":"ERR_CUS_000"
- }
- Available Status
- HTTP Code
- Meaning
- 200 OK
- 201 Created
- 401 Unauthorized
- 403 Forbidden
- 404 User not found
- 400
- Bad request
- Operation rules
- Operation rules
- Description
- Internal Error Code
- Error Description
- Update contact
- This method allow user update his/her another contact.
- API Path
- Endpoint
- Method
- /customer/{version}/customers/{customerId}/contatcs/{contactId} POST
- Parameters
- Description
- Parameter
- Type
- Mandatory
- Notes
- accessToken String x Include in header
- customerId Number x Path (id of customer)
- contactId Number x Path (id of contact)
- email String x Body
- phoneNumber String x Body
- Body Example
- {
- "email": "My email",
- "phoneNumber": "+33454545454"
- }
- Response
- N/A
- Available Status
- HTTP Code
- Meaning
- 200 OK
- 400
- Bad request
- 401 Unauthorized
- Operation rules
- Operation rules
- Description
- Internal Error Code
- Error Description
- Update location
- This method allow user update his/her location
- API Path
- Endpoint
- Method
- /customer/{version}/customers/{id}/locations/{locationId} POST
- Parameters
- Description
- Parameter
- Type
- Mandatory
- Notes
- accessToken String x Include in header
- customerId Number x Path (id of customer)
- locationId Number x Path (id of location)
- name String x Body
- address String x Body
- postalCode String x Body
- latitude Number x Body
- longitude Number x Body
- Example
- {
- "name": "My Home",
- "address": "Lottery Tower - 77 Tran Nhan Ton",
- "postalCode": "80010",
- "latitude": 45.2356485,
- "longitude": 75.3664545665
- }
- Response
- N/A
- Available Status
- HTTP Code
- Meaning
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 404 User not found
- 400
- Bad request
- Operation rules
- Operation rules
- Description
- Internal Error Code
- Error Description
- Update vehicle information
- This method allow user update his/her vehicle information
- API Path
- Endpoint
- Method
- /customer/{version}/customers/{id}/vehicles/{vehicleId} POST
- Parameters
- Description
- Parameter
- Type
- Mandatory
- Notes
- accessToken String x Include in header
- customerId Number x Path (id of customer)
- vehicleId Number x Path (id of vehicle)
- name String x Body
- Example
- {
- "name": "My Civic"
- }
- Response
- Description
- N/A
- Example
- N/A
- Available Status
- HTTP Code
- Meaning
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 404 User not found
- 400
- Bad request
- Operation rules
- Operation rules
- Description
- Internal Error Code
- Error Description
- Add new contact
- This method allow create new contact
- API Path
- Endpoint
- Method
- /customer/{version}/customers/{customerId}/contacts POST
- Parameters
- Description
- Parameter
- Type
- Mandatory
- Notes
- accessToken String x Include in header
- customerId Number x Path (id of customer)
- email String x Body
- phoneNumber String x Body
- Body Example
- {
- "email": "My email",
- "phoneNumber": "+33454545454"
- }
- Available Status
- HTTP Code
- Meaning
- 200 OK
- 401 Unauthorized
- 403 Forbidden
- 404 User not found
- 400
- Bad request
- Operation rules
- Operation rules
- Description
- Internal Error Code
- Error Description
- Add new vehicle
- This method allow user create new vehicle
- API Path
- Endpoint Method
- /customer/{version}/customers/{customerId}/vehicles POST
- Parameters
- Description
- Parameter Type Mandatory Notes
- accessToken String x Include in header
- customerId Number x Path (id of customer)
- name String x Body
- model String x Body
- modelYear Number x Body
- plateNumber String x Body
- details String x Body
- Example
- {
- "name": "My Civic",
- "model": "CIVIC",
- "make": "HONDA",
- "modelYear": 2017,
- "plateNumber": "93T1-3332",
- "details": "Car's details here"
- }
- Add new location
- This method allow user create new location
- API Path
- Endpoint Method
- /customer/{version}/customers/{customerId}/locations POST
- Parameters
- Description
- Parameter Type Mandatory Notes
- accessToken String x Include in header
- customerId Number x Path (id of customer)
- name String x Body
- address String x Body
- postalCode String x Body
- latitude Number x Body
- longitude Number x Body
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement