PaidUpProductConnect.categoryRetrieve()

Retrieve categories of products

Usage

Hover over inputs/exits for more info.

var PaidUpProductConnect = require('paidup-product-connect');


// Retrieve categories of products

PaidUpProductConnect.categoryRetrieve({

baseUrl: 'http://localhost:9002',

token: 'secret-word',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (categories) {

 

},

});

Inputs

baseUrl required

Url microservice.

'http://localhost:9002'
token required

secret word for authenticate microservice.

'secret-word'

Exits

error

An unexpected error occurred.

{ status: 500,
  message: '[{"maybe some JSON": "like this"}]  (but could be any string)' }
success

OK.

'{\n        status: 200,\n        body: [\n          {\n            "_id": "105",\n            "name": "Team name",\n            "description": "some desc",\n            "company": "105",\n            "image": "http://localhost:8888/media//catalog/product/n/t/xxxxx.png",\n            "isActive": true,\n            "location": "Austin, TX",\n            "products": [\n              {\n                "_id":"ID",\n                "details": {\n                  "organizationId": "105",\n                  "organizationName": "Team name",\n                  "organizationLocation": "Austin, TX",\n                  "sku": "XXXSKUTEAM",\n                  "name": "14U White",\n                  "description": "XXXXs - 14U Description",\n                  "startAt": "2016-01-01",\n                  "endAt": "2016-12-31",\n                  "location": "Austin, TX",\n                  "geojson": {},\n                  "visitbility": true,\n                  "status": true,\n                  "images": {main:\'someUrl\'},\n                  "categories": [],\n                  "relatedProducts": []\n                },\n                "meta": {},\n                "processingFees": {\n                  "cardFeeDisplay": 2.9,\n                  "cardFeeActual": 2.9,\n                  "cardFeeFlatDisplay": 0.3,\n                  "cardFeeFlatActual": 0.3,\n                  "achFeeDisplay": 0,\n                  "achFeeActual": 0,\n                  "achFeeFlatDisplay": 0,\n                  "achFeeFlatActual": 0\n                },\n                "collectionsFee": {\n                  "fee": 5,\n                  "feeFlat": 0\n                },\n                "paysFees": {\n                  "processing": true,\n                  "collections": true\n                },\n                "paymentPlans": {\n                  "due1": {\n                    "description": "Full payment",\n                    "visible": true,\n                    "dues": [\n                      {\n                        "description": "some description",\n                        "dateCharge": "2016-02-26 10:30",\n                        "amount": 100,\n                        "discount": 50,\n                        "applyDiscount": false\n                      }\n                    ]\n                  }\n                }\n              }\n            ]\n          }\n        ]\n      }'