PaidUpProductConnect.productRetrieve()

Retrieve product by Id

Usage

Hover over inputs/exits for more info.

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


// Retrieve product by Id

PaidUpProductConnect.productRetrieve({

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

token: 'secret-word',

productId: '12',

}).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'
productId required

id product.

'12'

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          "_id" : "someId",\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            "cardFee": 2.9,\n            "cardFeeActual": 2.9,\n            "cardFeeFlat": 0.3,\n            "cardFeeFlatActual": 0.3,\n            "achFee": 0,\n            "achFeeActual": 0,\n            "achFeeFlat": 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      }'