Sellers
(ms.sellers)

Fields

title
Type: string

Required: Yes
Unique title of the seller
legal_name
Type: string
Legal name of the seller
website
Type: string
Website of the seller
address
Type: array
A collection of addresses of the seller
city
Type: string
City of the seller
state
Type: string
State of the seller
country
Type: string
Country of the seller
zip_code
Type: string
Zip code of the city to which seller belongs
invoice_prefix
Type: string
Invoice prefix to be used for seller
bank_details
Type: object
Bank details of the seller
pan
Type: string
Pan of the seller
pan_proof
Type: file
Pan proof of the seller
cin_number
Type: string
Cin number of the seller
tin
Type: string
Tin of the seller
tin_proof
Type: file
Tin proof of the seller
tan
Type: string
Tan of the seller
tan_proof
Type: file
Tan proof of the seller
cancelled_cheque
Type: file
Cancelled cheque of the seller
address_proof
Type: file
Address proof of the seller
id_proof
Type: file
ID proof of the seller
status
Type: string
Either approved/rejected/pending
List GET /api/1/entity/ms.sellers

List the records saved in the entity.

Example

List all the sellers
GET /api/1/entity/ms.sellers

Example Response Json

"data": [
    {
      "title": "teststore456",
      "approve": "1",
      "_id": "584fe4e577a2737140015f3f",
      "user": {
        "_id": "584fe4e577a2737140015f3f",
        "email": "teststore456@gmail2.com",
        "password": "$2a$10$8Vf8g1YC4QuoklcuaUogsO/vx0xQdwwyv.hWK8FVWarRJGYKAzbfS",
        "active": "1",
        "role": "superadmin",
        "verified": "1",
        "roles": [
          "superadmin",
          "seller"
        ],
        "child_entity_roles": [
          "seller"
        ],
        "approve_seller": "1"
      }
    },
    {
      "title": "organisation",
      "approve": "1",
      "status": "approved",
      "role": "seller",
      "bank_details": {},
      "notes": [],
      "_id": "57eb912adf4244575a3218e5",
      "user": {
        "_id": "57eb912adf4244575a3218e5",
        "first_name": "karishma",
        "password": "$2a$10$nguyIdMHln24lj3gGGDLw.vbZxKUKaCgGXFpP1pWl/7wm5iI7ORbO",
        "email": "ksinha210@gmail.com",
        "phone": "9958447321",
        "roles": [
          "member",
          "seller"
        ],
        "child_entity_roles": [
          "seller"
        ],
        "role": "member",
        "active": "1",
        "verified": "1",
        "verified_text": "57eb912adf4244575a3218e4",
        "verified_time": "1475055914674",
        "addresses": [],
        "account": [],
        "wishlist": [],
        "notes": [],
        "created_on": "2016-09-28T09:45:14.787Z"
      }
    },
    {
      "title": "lodrgihi",
      "approve": "1",
      "status": "approved",
      "role": "seller",
      "bank_details": {},
      "notes": [],
      "_id": "57eb8f56629f48230dd389f1",
      "user": {
        "_id": "57eb8f56629f48230dd389f1",
        "first_name": "rajiv",
        "password": "$2a$10$p1vVnHsmyavqcXM7l99M2eIf.g3boOImJ.Nddj9VMB5eQIn9A1IAq",
        "email": "rajiv@manusis.com",
        "phone": "1478523697",
        "roles": [
          "member",
          "seller"
        ],
        "child_entity_roles": [
          "seller"
        ],
        "role": "member",
        "active": "1",
        "verified": "1",
        "verified_text": "57eb8f56629f48230dd389f0",
        "verified_time": "1475055446256",
        "addresses": [],
        "account": [],
        "wishlist": [],
        "notes": [],
        "created_on": "2016-09-28T09:37:26.339Z"
      }
    }
]
Add POST /api/1/entity/ms.sellers

Add the record in the entity.

Example

Add a seller
POST /api/1/entity/ms.sellers

Example Request Json

{
"title": "new_seller",
"user":{
  "email": "abc@gmail.com",
  "password": "abc"
}
}

Example Response Json

{ 
    "status": 200,
     "data":{
           "_id":"55c863ec9be14a1b14e5249f"  
    }
}
Update PUT /api/1/entity/ms.sellers/#{_id}

Update the record in the entity.

Example

Edit a seller
PUT /api/1/entity/ms.sellers/55c863ec9be14a1b14e5249f

Example Request Json

{
 "recordId": "55c863ec9be14a1b14e5249f",
 "data": {
   "title": "newtitle"
 }
}
MakeDefaultSeller GET /api/1/entity/_/ms.sellers/makeDefaultSeller

Example

Mark a seller as default
GET /api/1/entity/_/ms.sellers/makeDefaultSeller

Example Request Json

{
  "data": {
    "default_seller": "57ac16f5bd5b3bda16ed50a7"
  }
}

Example Response Json

{
 status: 200,
 data: "Default seller changed successfully"
}

Message

Code Message
ms.sellers.makeDefaultSeller Default seller changed successfully
Approve /api/1/entity/ms.sellers/_/approve

Example

Approve a seller
/api/1/entity/_/ms.sellers/approve

Example Request Json

{
 query:{
    q: {
        _id: "57ac16f5bd5b3bda16ed50a7"
     }
}
}

Example Response Json

{
status: 200,
data: "Seller approved successfully"
}

Message

Code Message
ms.sellers.approve.success Seller approved successfully
Reject GET /api/1/entity/ms.sellers/_/reject

Example

Reject a seller
GET /api/1/entity/_/ms.sellers/reject

Example Request Json

{
query: {
  q: {
     _id: "57ac16f5bd5b3bda16ed50a7"
  }
},
data:{
  reason: "Sample reason"
}
}

Example Response Json

{
status: 200,
data: Seller Rejected successfully
}

Message

Code Message
ms.sellers.reject.success Seller rejected successfully