PaidUpProductConnect.productRetrieve()

Retrieve product by Id

Usage

Hover over inputs/exits for more info.

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

{ status: 200,
  body: 
   { 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: {} } }