All URIs are relative to https://mgmtapi.geins.io
Method | HTTP request | Description |
---|---|---|
createReturn | POST /API/Order/{orderId}/Return | Create return |
getReturn | GET /API/Order/{orderId}/Return/{returnId} | Get return |
listReturnCodes | GET /API/ReturnCode/List | List return codes |
listReturns | GET /API/Order/{orderId}/Return/List | List returns |
EnvelopeNullableInt createReturn(orderId, newReturn)
Create return
Creates a new return.
import GeinsSdkApiMgmtJavascript from '@geins/sdk-api-mgmt-javascript';
let defaultClient = GeinsSdkApiMgmtJavascript.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basicAuth
let basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
let apiInstance = new GeinsSdkApiMgmtJavascript.ReturnApi();
let orderId = 56; // Number | The Order ID.
let newReturn = new GeinsSdkApiMgmtJavascript.OrderReturnModelsWriteNewReturn(); // OrderReturnModelsWriteNewReturn | Contains all information about a return.
apiInstance.createReturn(orderId, newReturn, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
orderId | Number | The Order ID. | |
newReturn | OrderReturnModelsWriteNewReturn | Contains all information about a return. |
- Content-Type: application/json
- Accept: application/json
EnvelopeReturn getReturn(orderId, returnId)
Get return
import GeinsSdkApiMgmtJavascript from '@geins/sdk-api-mgmt-javascript';
let defaultClient = GeinsSdkApiMgmtJavascript.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basicAuth
let basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
let apiInstance = new GeinsSdkApiMgmtJavascript.ReturnApi();
let orderId = 56; // Number | The order id.
let returnId = 56; // Number | The return id.
apiInstance.getReturn(orderId, returnId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
orderId | Number | The order id. | |
returnId | Number | The return id. |
- Content-Type: Not defined
- Accept: application/json
EnvelopeListReturnCode listReturnCodes()
List return codes
Gets all valid return codes.
import GeinsSdkApiMgmtJavascript from '@geins/sdk-api-mgmt-javascript';
let defaultClient = GeinsSdkApiMgmtJavascript.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basicAuth
let basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
let apiInstance = new GeinsSdkApiMgmtJavascript.ReturnApi();
apiInstance.listReturnCodes((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
EnvelopeListReturn listReturns(orderId)
List returns
Get all returns on an order.
import GeinsSdkApiMgmtJavascript from '@geins/sdk-api-mgmt-javascript';
let defaultClient = GeinsSdkApiMgmtJavascript.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basicAuth
let basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
let apiInstance = new GeinsSdkApiMgmtJavascript.ReturnApi();
let orderId = 56; // Number | The order id.
apiInstance.listReturns(orderId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
orderId | Number | The order id. |
- Content-Type: Not defined
- Accept: application/json