# WisiApi.CodigosApi

All URIs are relative to *https://api.bakia.co*

Method | HTTP request | Description
------------- | ------------- | -------------
[**codigosGet**](CodigosApi.md#codigosGet) | **GET** /codigos | 
[**solicitarCodigoPost**](CodigosApi.md#solicitarCodigoPost) | **POST** /solicitar_codigo | 


<a name="codigosGet"></a>
# **codigosGet**
> InlineResponse2004 codigosGet()



Obtiene objetos &#x60;Codigo&#x60;. Parametro requerido **access_token** que retorna los codigos activos del usuario 

### Example
```javascript
var WisiApi = require('wisi_api');
var defaultClient = WisiApi.ApiClient.default;

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

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

var apiInstance = new WisiApi.CodigosApi();

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

### Parameters
This endpoint does not need any parameter.

### Return type

[**InlineResponse2004**](InlineResponse2004.md)

### Authorization

[access_token](../README.md#access_token), [api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json

<a name="solicitarCodigoPost"></a>
# **solicitarCodigoPost**
> InlineResponse2005 solicitarCodigoPost(cid)



Obtiene objeto &#x60;Codigo&#x60;. o una respuesta con error al no poder generarlo Parametro requerido **access_token** y **cid**  

### Example
```javascript
var WisiApi = require('wisi_api');
var defaultClient = WisiApi.ApiClient.default;

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

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

var apiInstance = new WisiApi.CodigosApi();

var cid = 56; // Number | id de la campaña


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cid** | **Number**| id de la campaña | 

### Return type

[**InlineResponse2005**](InlineResponse2005.md)

### Authorization

[access_token](../README.md#access_token), [api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json

