Skip to content

PakaUsers API

Kaja W edited this page Dec 20, 2021 · 13 revisions

PakaUsers

Authenticate

POST/api/authenticate/login

Args

no args
Request body:
{ userName: string, password: string }

Response

{ token: string, expiration: DateTime }

BusinessClient

POST /api​/business-client

Args

no args
Request body:
{ userName: string, email: email, phoneNumber: string, password: string, companyName: string, nip: string }

Response

{ companyName: string, nip: string, id: string, userName: string, email: email, isActive: bool, userType: int }

Courier

POST /api​/courier

Args

no args
Request body:
{ userName: string, email: email, phoneNumber: string, password: string, name: string, surname: string, warehouseId: int, warehouseType: string, salary: decimal }

Response

{ name: string, surname: string, id: string, userName: string, email: email, isActive: bool, userType: int, warehouseId: int, warehouseType: string, salary: decimal }

IndividualClient

POST /api​/individual-client

Args

no args
Request body:
{ userName: string, email: email, phoneNumber: string, password: string, name: string, surname: string }

Response

{ name: string, surname: string, id: string, userName: string, email: email, isActive: bool, userType: int }

Logistician

POST ​/api​/logistician

Args

no args
Request body:
{ userName: string, email: email, phoneNumber: string, password: string, name: string, surname: string, warehouseId: int, warehouseType: string, salary: decimal }

Response

{ name: string, surname: string, id: string, userName: string, email: email, isActive: bool, userType: int, warehouseId: int, warehouseType: string, salary: decimal }

User

GET api/user

Args

no args

Response

{[ id: string, userName: string, email: email, isActive: bool, userType: int ]}

GET ​/api​/user​/{id}

Args

Request param: id

Response

{ id: string, userName: string, email: email, isActive: bool, userType: int }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, companyName: string, nip: string, }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, name: string, surname: string }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, warehouseId: int, warehouseType: string, salary: decimal }

DELETE ​/api​/user​/{id}

Args

Request param: id

Response

noContent

GET api/user​/email​/{email}

Args

Request param: email

Response

{ id: string, userName: string, email: email, isActive: bool, userType: int }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, companyName: string, nip: string, }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, name: string, surname: string }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, warehouseId: int, warehouseType: string, salary: decimal }

PUT api/user​/anonymize​/{id}

Args

Request param: id

Response

empty body

GET api/user/me

Args

no args

Response

{ id: string, userName: string, email: email, isActive: bool, userType: int }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, companyName: string, nip: string, }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, name: string, surname: string }
or
{ id: string, userName: string, email: email, isActive: bool, userType: int, warehouseId: int, warehouseType: string, salary: decimal }

POST ​/api​/user​/me​/address-book

Args

no args
Request body:
{ addressName: string, personalities: string, email: email, city: string, street: string, postalCode: string, buildingNumber: string, flatNumber: string }

Response

{ personId: string, addressName: string, personalities: string, email: email, city: string, street: string, postalCode: string, buildingNumber: string, flatNumber: string }

GET ​api/user/me​/address-book

Args

no args

Response

{[ id: int, addressName: string, personalities: string, email: email, city: string, street: string, postalCode: string, buildingNumber: string, flatNumber: string, businessClientId: string, clientId: string ]}

PUT ​api/user/activate-user​/{id}

Args

Request param: id
Request body:
{ isActive: bool }

Response

empty body

Warehouse

GET ​api/warehouse/logisticians​/{id}

Args

Request param: id

Response

{[ name: string, surname: string, salary: decimal, warehouseId: int, warehouseType: string, id: string, userName: string, email: email, isActive: bool, userType: int ]}

GET ​api/warehouse/couriers/{id}

Args

Request param: id

Response

{[ name: string, surname: string, salary: decimal, warehouseId: int, warehouseType: string, id: string, userName: string, email: email, isActive: bool, userType: int ]}

Clone this wiki locally