MarketPe APIs

Auth (common)

Base URL

Staging: https://marketpe-api-staging.azurewebsites.net/
Production: https://backend.marketpe.app/

Token generation

POST
/api/login

Request Body

{
  "username": "username",
  "password": "password"
}

Response Body

  • accessToken is jwt token
  • validTill is in ISO format
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXJuYW1lIiwicGFyZW50T3JnYW5pemF0aW9uSWQiOiJwYXJlbnQtb3JnLTEiLCJpcHMiOm51bGwsImlhdCI6MTczNjUwMDQ3NywiZXhwIjoxNzM2NTAyMjc3fQ.YAMF8Y4qigdkJTR5LzSyO78JYpqUudCgno_eiHiU-T8",
  "validTill": "2025-01-10T09:44:37.075Z"
}

API Authentication

This is common for all endpoints.

POST
/api/any_specific_endpoint

Request headers

Authorization: Bearer jwt_token

Response Code

200 OK
400 Bad/Wrong Request
401 Unauthorized
500 Internal Server Error

Response Body on success

{
    "fetchedOn": "2025-01-29T17:25:53.746Z", // ISO format
    "data": {
        ...
    }
}

Response Body on error

{
    "message": "error_message"
}

Last updated on