Inbound OMS Order

BatchRequests

batchPost

Send a group of requests

Group multiple requests into a single request payload, see [Batch Requests](https://www.odata.org/documentation/odata-version-2-0/batch-processing/) and [Batch and Bulk Persistence](https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/bad9b0b66bac476f8a4a5c4a08e4ab6b/0d45f25361294a99997837ccbdf1fc0e.html).


/$batch

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: multipart/mixed; boundary=batch_some_identifier;charset=UTF-8,application/json"\
-H "Content-Type: multipart/mixed"\
"https://localhost:9002/odata2webservices/InboundOMSOrder/$batch"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BatchRequestsApi;

import java.io.File;
import java.util.*;

public class BatchRequestsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuthentication
        HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuthentication");
        basicAuthentication.setUsername("YOUR USERNAME");
        basicAuthentication.setPassword("YOUR PASSWORD");

        BatchRequestsApi apiInstance = new BatchRequestsApi();
        Batch_body body = ; // Batch_body | 
        String contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in for batch request.
        try {
            'String' result = apiInstance.batchPost(body, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BatchRequestsApi#batchPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BatchRequestsApi;

public class BatchRequestsApiExample {

    public static void main(String[] args) {
        BatchRequestsApi apiInstance = new BatchRequestsApi();
        Batch_body body = ; // Batch_body | 
        String contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in for batch request.
        try {
            'String' result = apiInstance.batchPost(body, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BatchRequestsApi#batchPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuthentication)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
Batch_body *body = ; // 
String *contentType = contentType_example; // Content-Type header specifying the Media Type the request body is formatted in for batch request. (optional)

BatchRequestsApi *apiInstance = [[BatchRequestsApi alloc] init];

// Send a group of requests
[apiInstance batchPostWith:body
    contentType:contentType
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundOmsOrder = require('inbound_oms_order');
var defaultClient = InboundOmsOrder.ApiClient.instance;
// Configure HTTP basic authorization: basicAuthentication
var basicAuthentication = defaultClient.authentications['basicAuthentication'];
basicAuthentication.username = 'YOUR USERNAME'
basicAuthentication.password = 'YOUR PASSWORD'

var api = new InboundOmsOrder.BatchRequestsApi()
var body = ; // {{Batch_body}} 
var opts = { 
  'contentType': contentType_example // {{String}} Content-Type header specifying the Media Type the request body is formatted in for batch request.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.batchPost(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class batchPostExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuthentication
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new BatchRequestsApi();
            var body = new Batch_body(); // Batch_body | 
            var contentType = contentType_example;  // String | Content-Type header specifying the Media Type the request body is formatted in for batch request. (optional) 

            try
            {
                // Send a group of requests
                'String' result = apiInstance.batchPost(body, contentType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BatchRequestsApi.batchPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuthentication
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiBatchRequestsApi();
$body = ; // Batch_body | 
$contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in for batch request.

try {
    $result = $api_instance->batchPost($body, $contentType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BatchRequestsApi->batchPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BatchRequestsApi;
# Configure HTTP basic authorization: basicAuthentication
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::BatchRequestsApi->new();
my $body = WWW::SwaggerClient::Object::Batch_body->new(); # Batch_body | 
my $contentType = contentType_example; # String | Content-Type header specifying the Media Type the request body is formatted in for batch request.

eval { 
    my $result = $api_instance->batchPost(body => $body, contentType => $contentType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BatchRequestsApi->batchPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuthentication
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.BatchRequestsApi()
body =  # Batch_body | 
contentType = contentType_example # String | Content-Type header specifying the Media Type the request body is formatted in for batch request. (optional)

try: 
    # Send a group of requests
    api_response = api_instance.batch_post(body, contentType=contentType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BatchRequestsApi->batchPost: %s\n" % e)

Parameters

Header parameters
Name Description
Content-Type
String
Content-Type header specifying the Media Type the request body is formatted in for batch request.
Body parameters
Name Description
body *

Responses

Status: 202 - The response of the bulk request. If there is any error, it is part of the response payload

Status: 400 - Error in the formatting of the payload data

Status: 401 - Unauthorized exception responses

Status: 403 - Forbidden exception responses

Status: 404 - Not Found exception responses for POST operations.

Status: 415 - Provided Media-Type is not supported


SAPOrders

sAPOrdersPost

Creates an SAP order.

Creates an SAP order or updates an existing one to update an order in Order Management System (OMS). An SAP order refers to any transaction that is created, processed, and managed within the SAP system including ERP, S4HANA and S4HANA cloud environment. An order in Order Management System refers to the complete lifecycle of a customer’s order.


/SAPOrders

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://localhost:9002/odata2webservices/InboundOMSOrder/SAPOrders"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SAPOrdersApi;

import java.io.File;
import java.util.*;

public class SAPOrdersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuthentication
        HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuthentication");
        basicAuthentication.setUsername("YOUR USERNAME");
        basicAuthentication.setPassword("YOUR PASSWORD");

        SAPOrdersApi apiInstance = new SAPOrdersApi();
        SAPOrders_body body = ; // SAPOrders_body | 
        String accept = accept_example; // String | Accept header specifying the Media Type the API should respond with.
        String contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in.
        try {
            Wrapper result = apiInstance.sAPOrdersPost(body, accept, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SAPOrdersApi#sAPOrdersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SAPOrdersApi;

public class SAPOrdersApiExample {

    public static void main(String[] args) {
        SAPOrdersApi apiInstance = new SAPOrdersApi();
        SAPOrders_body body = ; // SAPOrders_body | 
        String accept = accept_example; // String | Accept header specifying the Media Type the API should respond with.
        String contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in.
        try {
            Wrapper result = apiInstance.sAPOrdersPost(body, accept, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SAPOrdersApi#sAPOrdersPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuthentication)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
SAPOrders_body *body = ; // 
String *accept = accept_example; // Accept header specifying the Media Type the API should respond with. (optional)
String *contentType = contentType_example; // Content-Type header specifying the Media Type the request body is formatted in. (optional)

SAPOrdersApi *apiInstance = [[SAPOrdersApi alloc] init];

// Creates an SAP order.
[apiInstance sAPOrdersPostWith:body
    accept:accept
    contentType:contentType
              completionHandler: ^(Wrapper output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundOmsOrder = require('inbound_oms_order');
var defaultClient = InboundOmsOrder.ApiClient.instance;
// Configure HTTP basic authorization: basicAuthentication
var basicAuthentication = defaultClient.authentications['basicAuthentication'];
basicAuthentication.username = 'YOUR USERNAME'
basicAuthentication.password = 'YOUR PASSWORD'

var api = new InboundOmsOrder.SAPOrdersApi()
var body = ; // {{SAPOrders_body}} 
var opts = { 
  'accept': accept_example // {{String}} Accept header specifying the Media Type the API should respond with.
  'contentType': contentType_example // {{String}} Content-Type header specifying the Media Type the request body is formatted in.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sAPOrdersPost(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sAPOrdersPostExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuthentication
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new SAPOrdersApi();
            var body = new SAPOrders_body(); // SAPOrders_body | 
            var accept = accept_example;  // String | Accept header specifying the Media Type the API should respond with. (optional) 
            var contentType = contentType_example;  // String | Content-Type header specifying the Media Type the request body is formatted in. (optional) 

            try
            {
                // Creates an SAP order.
                Wrapper result = apiInstance.sAPOrdersPost(body, accept, contentType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SAPOrdersApi.sAPOrdersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuthentication
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiSAPOrdersApi();
$body = ; // SAPOrders_body | 
$accept = accept_example; // String | Accept header specifying the Media Type the API should respond with.
$contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in.

try {
    $result = $api_instance->sAPOrdersPost($body, $accept, $contentType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SAPOrdersApi->sAPOrdersPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SAPOrdersApi;
# Configure HTTP basic authorization: basicAuthentication
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::SAPOrdersApi->new();
my $body = WWW::SwaggerClient::Object::SAPOrders_body->new(); # SAPOrders_body | 
my $accept = accept_example; # String | Accept header specifying the Media Type the API should respond with.
my $contentType = contentType_example; # String | Content-Type header specifying the Media Type the request body is formatted in.

eval { 
    my $result = $api_instance->sAPOrdersPost(body => $body, accept => $accept, contentType => $contentType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SAPOrdersApi->sAPOrdersPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuthentication
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.SAPOrdersApi()
body =  # SAPOrders_body | 
accept = accept_example # String | Accept header specifying the Media Type the API should respond with. (optional)
contentType = contentType_example # String | Content-Type header specifying the Media Type the request body is formatted in. (optional)

try: 
    # Creates an SAP order.
    api_response = api_instance.s_ap_orders_post(body, accept=accept, contentType=contentType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SAPOrdersApi->sAPOrdersPost: %s\n" % e)

Parameters

Header parameters
Name Description
Accept
String
Accept header specifying the Media Type the API should respond with.
Content-Type
String
Content-Type header specifying the Media Type the request body is formatted in.
Body parameters
Name Description
body *

Responses

Status: 201 - Success response with the created Orders as part of the OMS order scenario

Status: 400 - invalid_metadata_error_content and additional error responses that may occur when sending a POST request in an attempt to create a new Item.

Status: 401 - Unauthorized exception responses

Status: 403 - Forbidden exception responses

Status: 404 - Not Found exception responses for POST operations.

Status: 415 - Provided Media-Type is not supported