All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
ordersCreateDiscountLine | POST /orders/{id}/discount_lines | Create Discount |
ordersDeleteDiscountLines | DELETE /orders/{id}/discount_lines/{discount_lines_id} | Delete Discount |
ordersGetDiscountLine | GET /orders/{id}/discount_lines/{discount_lines_id} | Get Discount |
ordersGetDiscountLines | GET /orders/{id}/discount_lines | Get a List of Discount |
ordersUpdateDiscountLines | PUT /orders/{id}/discount_lines/{discount_lines_id} | Update Discount |
DiscountLinesResponse ordersCreateDiscountLine(id, orderDiscountLinesRequest, acceptLanguage, xChildCompanyId)
Create Discount
Create discount lines for an existing orden
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.DiscountsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
DiscountsApi apiInstance = new DiscountsApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
OrderDiscountLinesRequest orderDiscountLinesRequest = new OrderDiscountLinesRequest(); // OrderDiscountLinesRequest | requested field for a discount lines
String acceptLanguage = "es"; // String | Use for knowing which language to use
String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
try {
DiscountLinesResponse result = apiInstance.ordersCreateDiscountLine(id, orderDiscountLinesRequest, acceptLanguage, xChildCompanyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DiscountsApi#ordersCreateDiscountLine");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
orderDiscountLinesRequest | OrderDiscountLinesRequest | requested field for a discount lines | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
xChildCompanyId | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | - |
401 | authentication error | - |
404 | not found entity | - |
500 | internal server error | - |
DiscountLinesResponse ordersDeleteDiscountLines(id, discountLinesId, acceptLanguage, xChildCompanyId)
Delete Discount
Delete an existing discount lines for an existing orden
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.DiscountsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
DiscountsApi apiInstance = new DiscountsApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
String discountLinesId = "dis_lin_2tQ974hSHcsdeSZHG"; // String | discount line id identifier
String acceptLanguage = "es"; // String | Use for knowing which language to use
String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
try {
DiscountLinesResponse result = apiInstance.ordersDeleteDiscountLines(id, discountLinesId, acceptLanguage, xChildCompanyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DiscountsApi#ordersDeleteDiscountLines");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
discountLinesId | String | discount line id identifier | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
xChildCompanyId | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | - |
401 | authentication error | - |
404 | not found entity | - |
422 | parameter validation error | - |
500 | internal server error | - |
DiscountLinesResponse ordersGetDiscountLine(id, discountLinesId, acceptLanguage, xChildCompanyId)
Get Discount
Get an existing discount lines for an existing orden
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.DiscountsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
DiscountsApi apiInstance = new DiscountsApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
String discountLinesId = "dis_lin_2tQ974hSHcsdeSZHG"; // String | discount line id identifier
String acceptLanguage = "es"; // String | Use for knowing which language to use
String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
try {
DiscountLinesResponse result = apiInstance.ordersGetDiscountLine(id, discountLinesId, acceptLanguage, xChildCompanyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DiscountsApi#ordersGetDiscountLine");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
discountLinesId | String | discount line id identifier | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
xChildCompanyId | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | - |
401 | authentication error | - |
404 | not found entity | - |
422 | parameter validation error | - |
500 | internal server error | - |
GetOrderDiscountLinesResponse ordersGetDiscountLines(id, acceptLanguage, xChildCompanyId, limit, search, next, previous)
Get a List of Discount
Get discount lines for an existing orden
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.DiscountsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
DiscountsApi apiInstance = new DiscountsApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
String acceptLanguage = "es"; // String | Use for knowing which language to use
String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
Integer limit = 20; // Integer | The numbers of items to return, the maximum value is 250
String search = "search_example"; // String | General order search, e.g. by mail, reference etc.
String next = "next_example"; // String | next page
String previous = "previous_example"; // String | previous page
try {
GetOrderDiscountLinesResponse result = apiInstance.ordersGetDiscountLines(id, acceptLanguage, xChildCompanyId, limit, search, next, previous);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DiscountsApi#ordersGetDiscountLines");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
xChildCompanyId | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
limit | Integer | The numbers of items to return, the maximum value is 250 | [optional] [default to 20] |
search | String | General order search, e.g. by mail, reference etc. | [optional] |
next | String | next page | [optional] |
previous | String | previous page | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | - |
401 | authentication error | - |
500 | internal server error | - |
DiscountLinesResponse ordersUpdateDiscountLines(id, discountLinesId, updateOrderDiscountLinesRequest, acceptLanguage, xChildCompanyId)
Update Discount
Update an existing discount lines for an existing orden
// Import classes:
import com.conekta.ApiClient;
import com.conekta.ApiException;
import com.conekta.Configuration;
import com.conekta.auth.*;
import com.conekta.model.*;
import com.conekta.DiscountsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.conekta.io");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
DiscountsApi apiInstance = new DiscountsApi(defaultClient);
String id = "6307a60c41de27127515a575"; // String | Identifier of the resource
String discountLinesId = "dis_lin_2tQ974hSHcsdeSZHG"; // String | discount line id identifier
UpdateOrderDiscountLinesRequest updateOrderDiscountLinesRequest = new UpdateOrderDiscountLinesRequest(); // UpdateOrderDiscountLinesRequest | requested field for a discount lines
String acceptLanguage = "es"; // String | Use for knowing which language to use
String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request.
try {
DiscountLinesResponse result = apiInstance.ordersUpdateDiscountLines(id, discountLinesId, updateOrderDiscountLinesRequest, acceptLanguage, xChildCompanyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DiscountsApi#ordersUpdateDiscountLines");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
discountLinesId | String | discount line id identifier | |
updateOrderDiscountLinesRequest | UpdateOrderDiscountLinesRequest | requested field for a discount lines | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to es] [enum: es, en] |
xChildCompanyId | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
Status code | Description | Response headers |
---|---|---|
200 | successful | - |
401 | authentication error | - |
404 | not found entity | - |
422 | parameter validation error | - |
500 | internal server error | - |