createWarehouseLocation
Create Warehouse Location
Create Warehouse location under a specified warehouse
/Spenda/WarehouseManagement/Warehouses/{warehouseID}/Locations
Usage and SDK Samples
curl -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"https://api.dev.spenda.co/api/Spenda/WarehouseManagement/Warehouses/{warehouseID}/Locations" \
-d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.WarehouseLocationsApi;
import java.io.File;
import java.util.*;
public class WarehouseLocationsApiExample {
public static void main(String[] args) {
// Create an instance of the API class
WarehouseLocationsApi apiInstance = new WarehouseLocationsApi();
Integer warehouseID = 56; // Integer | The warehouse ID
WarehouseLocationRequest warehouseLocationRequest = {"name":"string","description":"string","parentWarehouseLocationID":0}; // WarehouseLocationRequest |
try {
httpActionResult_warehouseLocationResponse result = apiInstance.createWarehouseLocation(warehouseID, warehouseLocationRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WarehouseLocationsApi#createWarehouseLocation");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final Integer warehouseID = new Integer(); // Integer | The warehouse ID
final WarehouseLocationRequest warehouseLocationRequest = new WarehouseLocationRequest(); // WarehouseLocationRequest |
try {
final result = await api_instance.createWarehouseLocation(warehouseID, warehouseLocationRequest);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->createWarehouseLocation: $e\n');
}
import org.openapitools.client.api.WarehouseLocationsApi;
public class WarehouseLocationsApiExample {
public static void main(String[] args) {
WarehouseLocationsApi apiInstance = new WarehouseLocationsApi();
Integer warehouseID = 56; // Integer | The warehouse ID
WarehouseLocationRequest warehouseLocationRequest = {"name":"string","description":"string","parentWarehouseLocationID":0}; // WarehouseLocationRequest |
try {
httpActionResult_warehouseLocationResponse result = apiInstance.createWarehouseLocation(warehouseID, warehouseLocationRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WarehouseLocationsApi#createWarehouseLocation");
e.printStackTrace();
}
}
}
// Create an instance of the API class
WarehouseLocationsApi *apiInstance = [[WarehouseLocationsApi alloc] init];
Integer *warehouseID = 56; // The warehouse ID (default to null)
WarehouseLocationRequest *warehouseLocationRequest = {"name":"string","description":"string","parentWarehouseLocationID":0}; // (optional)
// Create Warehouse Location
[apiInstance createWarehouseLocationWith:warehouseID
warehouseLocationRequest:warehouseLocationRequest
completionHandler: ^(httpActionResult_warehouseLocationResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SpendaServicesWarehouseManagement = require('spenda_services_warehouse_management');
// Create an instance of the API class
var api = new SpendaServicesWarehouseManagement.WarehouseLocationsApi()
var warehouseID = 56; // {Integer} The warehouse ID
var opts = {
'warehouseLocationRequest': {"name":"string","description":"string","parentWarehouseLocationID":0} // {WarehouseLocationRequest}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createWarehouseLocation(warehouseID, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class createWarehouseLocationExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new WarehouseLocationsApi();
var warehouseID = 56; // Integer | The warehouse ID (default to null)
var warehouseLocationRequest = new WarehouseLocationRequest(); // WarehouseLocationRequest | (optional)
try {
// Create Warehouse Location
httpActionResult_warehouseLocationResponse result = apiInstance.createWarehouseLocation(warehouseID, warehouseLocationRequest);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling WarehouseLocationsApi.createWarehouseLocation: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\WarehouseLocationsApi();
$warehouseID = 56; // Integer | The warehouse ID
$warehouseLocationRequest = {"name":"string","description":"string","parentWarehouseLocationID":0}; // WarehouseLocationRequest |
try {
$result = $api_instance->createWarehouseLocation($warehouseID, $warehouseLocationRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WarehouseLocationsApi->createWarehouseLocation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::WarehouseLocationsApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::WarehouseLocationsApi->new();
my $warehouseID = 56; # Integer | The warehouse ID
my $warehouseLocationRequest = WWW::OPenAPIClient::Object::WarehouseLocationRequest->new(); # WarehouseLocationRequest |
eval {
my $result = $api_instance->createWarehouseLocation(warehouseID => $warehouseID, warehouseLocationRequest => $warehouseLocationRequest);
print Dumper($result);
};
if ($@) {
warn "Exception when calling WarehouseLocationsApi->createWarehouseLocation: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.WarehouseLocationsApi()
warehouseID = 56 # Integer | The warehouse ID (default to null)
warehouseLocationRequest = {"name":"string","description":"string","parentWarehouseLocationID":0} # WarehouseLocationRequest | (optional)
try:
# Create Warehouse Location
api_response = api_instance.create_warehouse_location(warehouseID, warehouseLocationRequest=warehouseLocationRequest)
pprint(api_response)
except ApiException as e:
print("Exception when calling WarehouseLocationsApi->createWarehouseLocation: %s\n" % e)
extern crate WarehouseLocationsApi;
pub fn main() {
let warehouseID = 56; // Integer
let warehouseLocationRequest = {"name":"string","description":"string","parentWarehouseLocationID":0}; // WarehouseLocationRequest
let mut context = WarehouseLocationsApi::Context::default();
let result = client.createWarehouseLocation(warehouseID, warehouseLocationRequest, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| warehouseID* |
Integer
(int32)
The warehouse ID
Required
|
| Name | Description |
|---|---|
| warehouseLocationRequest |