b2BCustomersPost
Creates a B2B customer.
Creates a B2B customer or updates an existing one in the system.
/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 | Media type for the response as specified in the accept header.
String contentType = contentType_example; // String | Media type for the request body.
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 | Media type for the response as specified in the accept header.
String contentType = contentType_example; // String | Media type for the request body.
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; // Media type for the response as specified in the accept header. (optional)
String *contentType = contentType_example; // Media type for the request body. (optional)
B2BCustomersApi *apiInstance = [[B2BCustomersApi alloc] init];
// Creates a B2B customer.
[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}} Media type for the response as specified in the accept header.
'contentType': contentType_example // {{String}} Media type for the request body.
};
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 | Media type for the response as specified in the accept header. (optional)
var contentType = contentType_example; // String | Media type for the request body. (optional)
try
{
// Creates a B2B customer.
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 | Media type for the response as specified in the accept header.
$contentType = contentType_example; // String | Media type for the request body.
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 | Media type for the response as specified in the accept header.
my $contentType = contentType_example; # String | Media type for the request body.
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 | Media type for the response as specified in the accept header. (optional)
contentType = contentType_example # String | Media type for the request body. (optional)
try:
# Creates a B2B customer.
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
Media type for the response as specified in the accept header.
|
| Content-Type |
String
Media type for the request body.
|
Body parameters
| Name | Description |
|---|---|
| body * |