API Documentation

(Public APIs only)
API Base URL : https://backoffice.infinitemlmsoftware.com/api/

HTTP request headers

Following are the commonly used request headers.

  • api_key : api_key

    Used to identify if client has access to apis. api_key is obtained when creating account. It must be sent with all requests.

  • Accept: application/format

    Represents the format of response data returned. Commonly used format is json.

  • access_token: access_token

    Represents the authorization of app/user. It must be sent with all requests except authentication and forgot password. User can retrieve access_token on successful authentication.

  • Content-Type: application/format

    Represents the format of request body. Commonly used format is application/x-www-form-urlencoded

HTTP response status codes

Following are the commonly used status codes.

  • 200 OK - The request succeeded.
  • 201 Created - A POST method successfully created a resource.
  • 204 No Content - The server successfully executed the method but returns no response body.
  • 400 Bad Request - Request is not well-formed, syntactically incorrect, or violates schema.
  • 401 Unauthorized - Authentication failed due to invalid authentication credentials.
  • 403 Forbidden - Authorization failed due to insufficient permissions.
  • 404 Not Found - The specified resource does not exist.
  • 405 Method Not Allowed - The server does not implement the requested HTTP method.
  • 422 Unprocessable Entity - The API cannot complete the requested action, or the request action is semantically incorrect or fails business validation.
  • 500 Internal Server Error - An internal server error has occurred.

HTTP response for successful requests

Returns HTTP 2xx status code with status true. If response body contains data, it will be enclosed in data attribute as json.


  {
    "status": true,
    "data": 
  }
      
  

HTTP response for failed requests

Returns HTTP 4xx or 5xx status code with status false.


    {
    "status": false,
    "error": {
          "code": "",
          "description": ""
         }
  }
      
  

HTTP response for validation errors

Returns HTTP 422 Unprocessable Entity status code with status false.


    {
  "status": false,
  "error": {
        "code": "1003",
        "description": "Incorrect input format / validation error",
        "fields": {
          "": "",
          "": "",
        }
      }
  }
      
  

Custom Error Codes

  • 1001 - Invalid API Key
  • 1002 - Invalid Access Token
  • 1003 - Invalid Credentials / Invalid Username or Password
  • 1004 - Incorrect Input Format / Validation Error
  • 1005 - Login Blocked
  • 1006 - Registration Blocked
  • 1007 - Invalid Sponsor Username
  • 1008 - Position Not Usable / Position Already Filled
  • 1009 - Invalid Placement
  • 1010 - Username Not Available / Username Already Exists
  • 1011 - Invalid Username / Username Not Found
  • 1012 - Product Not Available
  • 1013 - Incorrect Date Format
  • 1014 - Insufficient E-wallet Balance
  • 1015 - Incorrect Transaction Password
  • 1016 - Invalid E-pin Code
  • 1017 - File Type Not Supported
  • 1018 - File Size Exceeded
  • 1019 - KYC Not Verified

List of APIs

Get access token

Authenticate the user with the system and obtain the access_token.

Request

Method URL
POST auth/access/
Type Params Data Type Required
POST username string yes
POST password string yes

Response

Status Params Data Type
200 access_token string

Register new user

Add new user into the system.

Request

Method URL
POST signup/
Type Params Data Type Required
POST sponsor_username String Yes
POST placement_username String Yes
POST position String Yes
POST product_id Integer Yes
POST Firstname String Yes
POST lastname String Yes
POST date_of_birth String Yes
POST email String Yes
POST mobile String Yes
POST username String Yes
POST password String Yes
POST password_confirmation String Yes
POST agree_terms boolean Yes
POST payment_method String Yes

- postion is used only in binary mlm plan. Possible values are L (left), R (right).

- date_of_birth must be in yyyy-mm-dd format.

- product_id is unique id of membership package.

- username is not used in case of dynamic username type.

- payment_method : Possible values are free_join, ewallet, epin.

- agree_terms : Value must be true.

Response

Status Params Data Type
201 username/ string

Get profile information

Retrieve user profile details.

Request

Method URL
GET profile/

Response

Status Params Data Type
200 username String
200 rank_name String
200 profile_image String
200 placement_user String
200 sponsor_user String
200 position String
200 membership_package String
200 firstname String
200 lastname String
200 gender String
200 date_of_birth String
200 address_line1 String
200 address_line2 String
200 country String
200 state String
200 city String
200 zip_code String
200 email String
200 mobile String
200 landline String
200 bank_name String
200 branch_name String
200 account_holder String
200 account_number String
200 ifsc String
200 pan String

Upload profile image

  • Upload profile picture.
  • Request headers

Content-Type : multipart/form-data

Request

Method URL
GET profile/image/
Type Params Data Type Required
POST image file yes

Response

Status Params Data Type
204

Update personal information

Update profile personal details.

Request

Method URL
PUT profile/personal/
Type Params Data Type Required
PUT firstname string yes
PUT lastname string no
PUT gender string yes
PUT date_of_birth string yes

- gender : Possible values are M (Male), F (Female).

- date_of_birth must be in yyyy-mm-dd format.

Response

Status Params Data Type
204

Update contact information

Update profile contact details.

Request

MethodURL
PUTprofile/contact/
MethodURLMethodURL
PUTaddress_line1stringyes
PUTaddress_line2stringno
PUTcountryintegeryes
PUTstateintegerno
PUTcitystringyes
PUTzip_codestringno
PUTemailstringyes
PUTmobilestringyes
PUTlandlinestringno

Response

StatusParamsData Type
204

Update bank information

Update profile bank details.

Request

MethodURL
PUTprofile/personal/
TypeParamsData TypeRequired
PUTbank_namestringno
PUTbranch_namestringno
PUTaccount_holderstringno
PUTaccount_numberstringno
PUTifscstringno
PUTpanstringno

Response

StatusParamsData Type
204

Change password

Change login password

Request

MethodURL
PUTprofile/personal/

TypeParamsData TypeRequired
PUTcurrent_passwordstringyes
PUTnew_passwordstringyes
PUTpassword_confirmationstringyes

Response

StatusParamsData Type
204

Forgot password

Reset option for forgotten login password. Successful response will send an email to user containing password reset link.

Request

MethodURL
POSTprofile/personal/
TypeParamsData TypeRequired
POSTcccccstringyes

Response

StatusParamsData Type
204

Change transaction password

Change ewallet transaction password.

Request

MethodURL
PUTewallet/password/
TypeParamsData TypeRequired
PUTcurrent_passwordstringyes
PUTnew_passwordstringyes
PUTpassword_confirmationstringyes

Response

StatusParamsData Type
204

Forgot transaction password

Reset option for forgotten ewallet transaction password. Successful response will send an email to user containing password reset link.

Request

MethodURL
POSTewallet/password/forget/

Response

StatusParamsData Type
204

Get ewallet balance

Get current ewallet balance of user.

Request

MethodURL
POSTewallet/balance/

Response

balancenumber
StatusParamsData Type
200

Order complete

Complete an order.

Request

MethodURL
POSTorder/
TypeParamsData TypeRequired
POSTorder_idstringyes
POSTtotal_amountnumberyes
POSTtotal_quantitystringyes
POSTtotal_pvnumberyes

- total_amount : Total order price.

- total_quantity : Total products quantity in the order.

- total_pv : Total pv/bv (points allocated for commission) in the order.

Response

StatusParamsData Type
204

Purchase using ewallet

Purchase/payment using users ewallet balance.

Request

MethodURL
POSTewallet/payment/
TypeParamsData TypeRequired
POSTpayment_amountnumberyes
POSTpurposestringyes
POSTewallet_usernamestringyes
POSTtransaction_passwordstringyes

- purpose : Possible values are purchase.

Response

StatusParamsData Type
204

Purchase using epin

Purchase/payment using users allocated epin code.

Request

MethodURL
POSTepin/payment/
TypeParamsData TypeRequired
POSTpayment_amountnumberyes
POSTepin_codestringyes

Response

StatusParamsData Type
204

Get membership packages

Get list of active membership packages in the system.

Request

MethodURL
GETpackage/membership/

Response

StatusParamsData Type
200productsarray

products array: json format

number
ParamsData Type
idinteger
namestring
amount

Get signup fee

Get signup fee in the system

Request

MethodURL
POSTsignup/fee/

Response

number
StatusParamsData Type
200fee

Get cart/purchase packages

Get list of active cart(purchase) packages in the system.

Request

MethodURL
POSTpackage/cart/

Response

StatusParamsData Type
200productsarray

products array: json format

ParamsData Type
idinteger
namestring
amountnumber
pvnumber
categorystring
imagestring

Get package details

Get details of specific package.

Request

MethodURL
GETpackage/{id}/

- id : Unique product_id of the package.

Response

StatusParamsData Type
200idinteger
200namestring
200amountnumber
200package_idstring
200pvnumber
200categorystring
200imagestring
200descriptionstring

Add product to cart

Add a product to shopping cart.

Request

MethodURL
POSTcart/products/
TypeParamsData TypeRequired
POSTproduct_idintegeryes
POSTquantityintegeryes

Response

StatusParamsData Type
204

Remove product from cart

Remove a product from shopping cart.

Request

MethodURL
POSTcart/products/
TypeParamsData TypeRequired
DELETEproduct_idintegeryes

Response

StatusParamsData Type
204

Clear cart products

Remove all products from shopping cart.

Request

MethodURL
POSTcart/products/all/

Response

StatusParamsData Type
204

Get products in cart

Get product items added in cart.

Request

MethodURL
POSTcart/products/

Response

StatusParamsData Type
204cart_itemsarray

cart_items array: json format

ParamsData Type
product_idinteger
product_namestring
product_amountnumber
quantitynumber

Add shipping address

Add shipping address for checkout.

Request

MethodURL
POSTcart/shipping_address/

Response

TypeParamsData TypeRequired
POSTnamestringyes
POSTaddressstringyes
POSTzip_codestringyes
POSTcitystringyes
POSTphonestringyes

Response

StatusParamsData Type
204

Remove shipping address

Remove shipping address.

Request

MethodURL
DELETEcart/shipping_address/
TypeParamsData TypeRequired
DELETEaddress_idintegeryes

Response

StatusParamsData Type
204

Get list of shipping address

Get all shipping address list for checkout.

Request

MethodURL
GETcart/shipping_address/

Response

StatusParamsData Type
200address_listarray

address_list array: json format

ParamsData Type
address_idinteger
namestring
addressstring
zip_codestring
citystring
phonestring

Set default shipping address

Choose default shipping address for checkout.

Request

MethodURL
POSTcart/shipping_address/default
TypeParamsData TypeRequired
POSTaddress_idintegeryes

Response

StatusParamsData Type
204

Cart checkout

Complete cart checkout process.

Request

MethodURL
POSTcart/checkout/
TypeParamsData TypeRequired
204xxxxxxxxx

Response

StatusParamsData Type
204
×
Version 12.0 has been released !!!
With Highly Augmented Features
Try demo to experience features of MLM Software 12.0
A quick glimpse at released version 12.0 features
Whatsapp