PaidUpProductConnect.categoryRetrieve()

Retrieve categories of products

Usage

Hover over inputs/exits for more info.

var PaidUpProductConnect = require('pu-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.

{ status: 200,
  body: 
   [ { _id: '105',
       name: 'Team name',
       description: 'some desc',
       company: '105',
       image: 'http://localhost:8888/media//catalog/product/n/t/xxxxx.png',
       isActive: true,
       products: 
        [ { details: 
             { organizationId: '105',
               organizationName: 'Team name',
               organizationLocation: 'Austin, TX',
               sku: 'XXXSKUTEAM',
               name: '14U White',
               description: 'XXXXs - 14U Description',
               startAt: '2016-01-01',
               endAt: '2016-12-31',
               location: 'Austin, TX',
               geojson: {},
               visitbility: true,
               status: true,
               images: { main: 'someUrl' },
               categories: [],
               relatedProducts: [] },
            meta: {},
            processingFees: 
             { cardFee: 2.9,
               cardFeeActual: 2.9,
               cardFeeFlat: 0.3,
               cardFeeFlatActual: 0.3,
               achFee: 0,
               achFeeActual: 0,
               achFeeFlat: 0,
               achFeeFlatActual: 0 },
            collectionsFee: { fee: 5, feeFlat: 0 },
            paysFees: { processing: true, collections: true },
            paymentPlans: {} } ] } ] }