Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Method: GET

Endpoint URL: /api/v0/supply_routers/<id>


Parameters:
  • id - (required, type: integer) ID of the supply router.

...

Code Block
languagejs
themeRDark
var request = require('request');

var options = {
  'method': 'GET',
  'url': 'https://admin-console.springserve.com/api/v0/supply_routers/25528',
  'headers': {
    'Authorization': 'yourAuthToken',
    'Content-Type': 'application/json'
  }
};

request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});


Edit a Supply Router

SDK

Code Block
In [1]: router = springserve.supply_routers.get(1234)

In [2]: router.name = "Test Router with new name"

In [3]: changed = router.save()


In [4]: changed.ok
Out [4]: True
In [5]: print changed.name

"Test Router with new name"

...

Method: PATCH

Endpoint URL: /api/v0/supply_routers/<id>

Notes - See response for all parameters that can be edited.


Parameters:
  • id - (required, type: integer) ID of the supply router.

...