# CymbioApi.OrderApi

All URIs are relative to *http://api1.cym.bio/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**postOrder**](OrderApi.md#postOrder) | **POST** /orders | New order
[**putOrder**](OrderApi.md#putOrder) | **PUT** /orders | Updates an order


<a name="postOrder"></a>
# **postOrder**
> Order postOrder(order)

New order

Saves a new order

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.OrderApi();

var order = new CymbioApi.NewOrder(); // NewOrder | The order to save


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **order** | [**NewOrder**](NewOrder.md)| The order to save | 

### Return type

[**Order**](Order.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="putOrder"></a>
# **putOrder**
> Order putOrder(order)

Updates an order

Updates an order

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.OrderApi();

var order = new CymbioApi.Order(); // Order | The order to update


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **order** | [**Order**](Order.md)| The order to update | 

### Return type

[**Order**](Order.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

