REGISTER USER - POST /register

body:

{
   "email":"email@example.com",
   "password":"yourPassword"
}

response:

{
    "status": "ok",
    "keys": {
        "privateKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "user": {
        "id": 20,
        "created": "2021-06-08T16:09:25.159+02:00",
        "email": "email@example.com",
        "first_name": null,
        "last_name": null,
        "phone": null,
        "avatar": null,
        "is_blocked": false,
        "is_mango_verified": false,
        "mango_pay_id": null,
        "favorites": []
    }
}

REGISTER CLIENT - POST /register/client/{cid}

cid - marketplace ID

body:

{
   "email":"email@example.com",
   "password":"yourPassword"
}

response:

{
    "status": "ok",
    "keys": {
        "privateKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "client": {
        "id": 20,
        "created": "2021-06-08T16:09:25.159+02:00",
        "email": "email@example.com",
        "first_name": null,
        "last_name": null,
        "phone": null,
        "billing_data": {
            "first_name": null,
            "last_name": null,
            "address": null,
            "postcode": null,
            "country": null,
            "NIP": null,
            "birth_day": null
        },
        "is_blocked": false,
        "favorites": []
    }
}

LOGIN USER - POST /login

body:

{
   "email":"email@example.com",
   "password":"yourPassword"
}

response:

{
    "status": "ok",
    "keys": {
        "privateKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "user": {
        "id": 20,
        "created": "2021-06-08T16:09:25.159+02:00",
        "email": "email@example.com",
        "first_name": null,
        "last_name": null,
        "phone": null,
        "marketplaces": [],
        "avatar": null,
        "is_blocked": false,
        "is_mango_verified": false,
        "mango_pay_id": null,
        "favorites": []
    }
}

SSO LOGIN USER - POST /login-email

body:

{
   "email":"email@example.com",
   "company_id":"1"
}

response:

{
    "status": "ok",
    "data": {
        "hash": "4i11l5fbubd6gn73uae4mdtyu2p9zxu6",
        "url": "https://cloud.mip.to/app/login-otp/4i11l5fbubd6gn73uae4mdtyu2p9zxu6?company_id=1"
    }
}

LOGIN CLIENT - POST /login/client/{cid}

cid - marketplace ID

body:

{
   "email":"email@example.com",
   "password":"yourPassword"
}

response:

{
    "status": "ok",
    "keys": {
        "privateKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "client": {
        "id": 20,
        "created": "2021-06-08T16:09:25.159+02:00",
        "email": "email@example.com",
        "first_name": null,
        "last_name": null,
        "phone": null,
        "billing_data": {
            "first_name": null,
            "last_name": null,
            "address": null,
            "postcode": null,
            "country": null,
            "NIP": null,
            "birth_day": null
        },
        "is_blocked": false,
        "favorites": []
    }
}

SSO LOGIN CLIENT - POST /client/login-email

body:

{
   "email":"email@example.com",
   "company_id":"1"
}

response:

{
    "status": "ok",
    "data": {
        "hash": "4i11l5fbubd6gn73uae4mdtyu2p9zxu6",
        "url": "https://marketplace.mip.to/login-otp/4i11l5fbubd6gn73uae4mdtyu2p9zxu6?company_id=1"
    }
}

BLOCK/UNBLOCK CLIENT - POST /client/{cid}/block/{id}

cid - marketplace ID
id - client ID

response:

{
    "status": "ok",
    "keys": {
        "privateKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "client": {
        "id": 20,
        "created": "2021-06-08T16:09:25.159+02:00",
        "email": "email@example.com",
        "first_name": null,
        "last_name": null,
        "phone": null,
        "billing_data": {
            "first_name": null,
            "last_name": null,
            "address": null,
            "postcode": null,
            "country": null,
            "NIP": null,
            "birth_day": null
        },
        "is_blocked": true,
        "favorites": []
    }
}

DELETE CLIENT - POST /client/{cid}/remove/{id}

cid - marketplace ID
id - client ID

response:

{
    "status": "ok",
}

FORGOT USER PASSWORD - POST /forgot-password

body:

{
   "email":"email@example.com",
}

response:

{
    "status": "ok",
    "message": "Email has been sent."
}

FORGOT CLIENT PASSWORD - POST /forgot-password/client

body:

{
   "email":"email@example.com",
}

response:

{
    "status": "ok",
    "message": "Email has been sent."
}

ADD MARKETPLACE MEMBER - POST /member/{cid}/add

cid - marketplace ID

body:

{
   "email":"email@example.com",
}

response:

{
    "status": "ok",
    "message": "Email has been sent."

}

REMOVE MARKETPLACE MEMBER - POST /member/{cid}/remove/{id}

cid - marketplace ID
id - user ID

response:

{
    "status": "ok",
}

BLOCK/UNBLOCK MARKETPLACE MEMBER - POST /member/{cid}/block/{id}

cid - marketplace ID
id - user ID

response:

{
    "status": "ok",
    "user": [...]
}