# ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.SerialNumberApi

All URIs are relative to *http://localhost/gemini-web/rest*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getAllSerialNumbers**](SerialNumberApi.md#getAllSerialNumbers) | **GET** /serial-number/serial-numbers | get list of resources
[**getSingleSerialNumber**](SerialNumberApi.md#getSingleSerialNumber) | **GET** /serial-number/serial-numbers/{id} | get resource


<a name="getAllSerialNumbers"></a>
# **getAllSerialNumbers**
> SerialNumberRestResultPage getAllSerialNumbers(opts)

get list of resources

Gets a list of resources.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.SerialNumberApi();

var opts = { 
  'limit': 56, // Number | An integer which is the limit (max number) of returned records (used for pagination).
  'offset': 56, // Number | An integer (< list-size-1) that is the offset of the first record to transmit (used for pagination).
  'page': 56, // Number | An integer that designates the pagenumber of the first record to transmit (used for pagination).
  'sort': "sort_example", // String | Valid sorting properties: editedBy, createdBy, id, editedOn, createdOn.
  'productId': 789, // Number | The ID of the product to which the serial number belongs.
  'stockId': 789, // Number | The ID of the stock to which the serial number belongs.
  'locationId': 789, // Number | The ID of the location to which the serial number's stock belongs.
  'serialNumber': "serialNumber_example", // String | The serial number.
  'status': "status_example", // String | The status of the product.
  'defaultStock': true, // Boolean | Specifies if the serial number should be looked up from the default stock.
  'expand': "expand_example", // String | Expandable properties:product,stock
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAllSerialNumbers(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **limit** | **Number**| An integer which is the limit (max number) of returned records (used for pagination). | [optional] 
 **offset** | **Number**| An integer (&lt; list-size-1) that is the offset of the first record to transmit (used for pagination). | [optional] 
 **page** | **Number**| An integer that designates the pagenumber of the first record to transmit (used for pagination). | [optional] 
 **sort** | **String**| Valid sorting properties: editedBy, createdBy, id, editedOn, createdOn. | [optional] 
 **productId** | **Number**| The ID of the product to which the serial number belongs. | [optional] 
 **stockId** | **Number**| The ID of the stock to which the serial number belongs. | [optional] 
 **locationId** | **Number**| The ID of the location to which the serial number&#39;s stock belongs. | [optional] 
 **serialNumber** | **String**| The serial number. | [optional] 
 **status** | **String**| The status of the product. | [optional] 
 **defaultStock** | **Boolean**| Specifies if the serial number should be looked up from the default stock. | [optional] 
 **expand** | **String**| Expandable properties:product,stock | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

[**SerialNumberRestResultPage**](SerialNumberRestResultPage.md)

### Authorization

[gemini_auth](../README.md#gemini_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="getSingleSerialNumber"></a>
# **getSingleSerialNumber**
> SerialNumberJson getSingleSerialNumber(id, opts)

get resource

Gets a single resource.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.SerialNumberApi();

var id = 789; // Number | The ID of the resource.

var opts = { 
  'expand': "expand_example", // String | Expandable properties:product,stock
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getSingleSerialNumber(id, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**| The ID of the resource. | 
 **expand** | **String**| Expandable properties:product,stock | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

[**SerialNumberJson**](SerialNumberJson.md)

### Authorization

[gemini_auth](../README.md#gemini_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

