Inbound B2B Customer

B2BCustomers

b2BCustomersPost

Add new entity to B2BCustomers

Add or update B2BCustomer entities


/B2BCustomers

Usage and SDK Samples

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

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

public class B2BCustomersApiExample {

    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");

        B2BCustomersApi apiInstance = new B2BCustomersApi();
        B2BCustomers_body body = ; // B2BCustomers_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.b2BCustomersPost(body, accept, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCustomersApi#b2BCustomersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.B2BCustomersApi;

public class B2BCustomersApiExample {

    public static void main(String[] args) {
        B2BCustomersApi apiInstance = new B2BCustomersApi();
        B2BCustomers_body body = ; // B2BCustomers_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.b2BCustomersPost(body, accept, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling B2BCustomersApi#b2BCustomersPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuthentication)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
B2BCustomers_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)

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

// Add new entity to B2BCustomers
[apiInstance b2BCustomersPostWith:body
    accept:accept
    contentType:contentType
              completionHandler: ^(Wrapper output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundB2BCustomer = require('inbound_b2_b_customer');
var defaultClient = InboundB2BCustomer.ApiClient.instance;
// Configure HTTP basic authorization: basicAuthentication
var basicAuthentication = defaultClient.authentications['basicAuthentication'];
basicAuthentication.username = 'YOUR USERNAME'
basicAuthentication.password = 'YOUR PASSWORD'

var api = new InboundB2BCustomer.B2BCustomersApi()
var body = ; // {{B2BCustomers_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.b2BCustomersPost(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new B2BCustomersApi();
            var body = new B2BCustomers_body(); // B2BCustomers_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
            {
                // Add new entity to B2BCustomers
                Wrapper result = apiInstance.b2BCustomersPost(body, accept, contentType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling B2BCustomersApi.b2BCustomersPost: " + 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\ApiB2BCustomersApi();
$body = ; // B2BCustomers_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->b2BCustomersPost($body, $accept, $contentType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling B2BCustomersApi->b2BCustomersPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BCustomersApi;
# Configure HTTP basic authorization: basicAuthentication
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::B2BCustomersApi->new();
my $body = WWW::SwaggerClient::Object::B2BCustomers_body->new(); # B2BCustomers_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->b2BCustomersPost(body => $body, accept => $accept, contentType => $contentType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling B2BCustomersApi->b2BCustomersPost: $@\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.B2BCustomersApi()
body =  # B2BCustomers_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: 
    # Add new entity to B2BCustomers
    api_response = api_instance.b2_b_customers_post(body, accept=accept, contentType=contentType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling B2BCustomersApi->b2BCustomersPost: %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 B2B Customer

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


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/InboundB2BCustomer/$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 InboundB2BCustomer = require('inbound_b2_b_customer');
var defaultClient = InboundB2BCustomer.ApiClient.instance;
// Configure HTTP basic authorization: basicAuthentication
var basicAuthentication = defaultClient.authentications['basicAuthentication'];
basicAuthentication.username = 'YOUR USERNAME'
basicAuthentication.password = 'YOUR PASSWORD'

var api = new InboundB2BCustomer.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