All URIs are relative to https://mgmtapi.geins.io
Method | HTTP request | Description |
---|---|---|
createSupplier | POST /API/Supplier | Create supplier |
getSupplier | GET /API/Supplier/{id} | Get supplier |
querySuppliers | POST /API/Supplier/Query | Query suppliers |
updateSupplier | PUT /API/Supplier/{id} | Update supplier |
EnvelopeSupplierModelsReadSupplier createSupplier(supplier)
Create supplier
Creates a new supplier.
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.SupplierApi();
let supplier = new GeinsSdkApiMgmtJavascript.SupplierModelsWriteSupplier(); // SupplierModelsWriteSupplier | The supplier to create.
apiInstance.createSupplier(supplier, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
supplier | SupplierModelsWriteSupplier | The supplier to create. |
EnvelopeSupplierModelsReadSupplier
- Content-Type: application/json
- Accept: application/json
EnvelopeSupplierModelsReadSupplier getSupplier(id)
Get supplier
Gets a specific supplier.
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.SupplierApi();
let id = 56; // Number | The id of the supplier to get.
apiInstance.getSupplier(id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The id of the supplier to get. |
EnvelopeSupplierModelsReadSupplier
- Content-Type: Not defined
- Accept: application/json
[SupplierModelsReadSupplier] querySuppliers(query)
Query suppliers
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.SupplierApi();
let query = new GeinsSdkApiMgmtJavascript.SupplierModelsSupplierQuery(); // SupplierModelsSupplierQuery | The details of the query
apiInstance.querySuppliers(query, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
query | SupplierModelsSupplierQuery | The details of the query |
- Content-Type: application/json
- Accept: application/json
EnvelopeSupplierModelsReadSupplier updateSupplier(id, supplier)
Update supplier
Updates a supplier. Leaving out a property will ensure no changes are made to that property. Collection properties will delete and/or add as necessary to match the supplied data.
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.SupplierApi();
let id = 56; // Number | The id of the supplier to update.
let supplier = new GeinsSdkApiMgmtJavascript.SupplierModelsWriteSupplier(); // SupplierModelsWriteSupplier | The supplier data to update.
apiInstance.updateSupplier(id, supplier, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The id of the supplier to update. | |
supplier | SupplierModelsWriteSupplier | The supplier data to update. |
EnvelopeSupplierModelsReadSupplier
- Content-Type: application/json
- Accept: application/json