POST
/biz-partners/{partnerId}/biz-partner-productsCreates Biz Partner Product record for given partnerId.
Privileges:
- biz-core.manage
Audit event:
- biz.core.v2.biz.partner.products.post
Errors:
- BIZ_CORE:BIZ_PARTNER_NOT_FOUND - Biz Partner not found
Validation errors:
- BIZ_CORE:RELATION_TYPE_ID_NOT_VALID - Relation type id is not valid.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_PRODUCT_TYPE_NOT_FOUND - Product type of the biz partner product not found.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_PRODUCT_TYPE_CANNOT_BE_ZERO - Product type of the biz partner product cannot be zero.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_PRODUCT_TYPE_MUST_BE_PROVIDED - Product type of the biz partner product must be provided.
- BIZ_CORE:PRODUCT_ID_NOT_VALID - Product id is not valid.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_PRODUCT_NOT_FOUND - Product of the biz partner product not found.
- BIZ_CORE:RELATION_TYPE_ID_NOT_VALID - Relation type id is not valid.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_RELATION_TYPE_NOT_FOUND - Relation type of the biz partner product not found.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_RELATION_TYPE_ID_CANNOT_BE_ZERO - Relation type id of the biz partner product cannot be zero.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_RELATION_TYPE_ID_MUST_BE_PROVIDED - Relation type id of the biz partner product must be provided.
- BIZ_CORE:COMBINATION_OF_BIZ_PARTNER_ID_INSTANCE_ID_PRODUCT_TYPE_PRODUCT_ID_AND_RELATION_TYPE_ID_ALREADY_EXIST - Combination of biz_partner_id, instance_id, product_type, product_id, relation_type_id already exists!
- BIZ_CORE:BIZ_PARTNER_PRODUCT_CUSTOMER_TYPE_NOT_SUPPORTED - Status of the biz partner product not supported.
- BIZ_CORE:ACCOUNT_MANAGER_ID_NOT_VALID - Account manager id is not valid.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_ACCOUNT_MANAGER_ID_NOT_FOUND - Account manager id of the biz partner product not found.
- BIZ_CORE:SERVICE_CATEGORY_ID_NOT_VALID - Service category id is not valid.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_SERVICE_CATEGORY_ID_NOT_FOUND - Service category id of the biz partner product not found.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_SERVICE_CATEGORY_NAME_CANNOT_BE_LONGER_THAN_30_CHARACTERS - Service category name of the biz partner product cannot be longer than 30 characters.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_SELLING_PAYMENT_TYPE_NOT_SUPPORTED - Selling payment type of the biz prod bulk sms not supported.
- BIZ_CORE:BIZ_PARTNER_PRODUCT_NOTES_TOO_LONG - Notes of the biz partner product cannot longer than 65535 characters.
- BIZ_CORE:SELLING_PAYMENT_DUE_NOT_VALID - Selling payment due is not valid.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_SELLING_PAYMENT_DUE_CANNOT_BE_GREATER_THAN_99999 - Selling payment due of the biz prod bulk sms cannot be greather than 99999.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_VALID_FROM_D_MUST_BE_PROVIDED - Valid from date of the biz prod bulk sms must be provided.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_VALID_FROM_D_IS_NOT_VALID - Valid from date of the biz prod bulk sms is not valid.
- BIZ_CORE:BILLING_CYCLE_NOT_VALID - Billing cycle is not valid.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_BILLING_CYCLE_CANNOT_BE_GREATER_THAN_99999 - Billing cycle of the biz prod bulk sms cannot be greather than 99999.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_BILLING_CYCLE_UNIT_NOT_SUPPORTED - Billing cycle unit of the biz prod bulk sms not supported.
- BIZ_CORE:CURRENCY_ID_NOT_VALID - Currency id is not valid.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_CURRENCY_ID_NOT_FOUND - Currency of the biz prod bulk sms not found.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_CURRENCY_ID_MUST_BE_PROVIDED - Currency of the biz prod bulk sms must be provided.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_INVOICE_TRIGGER_AMOUNT_WHOLE_NUMBER_CANNOT_BE_GREATER_THAN_(10^9)-1 - Invoice trigger amount of the biz prod bulk sms whole number cannot be greater than (10^9)-1.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_OVERDRAFT_LIMIT_WHOLE_NUMBER_CANNOT_BE_GREATER_THAN_(10^9)-1 - Overdraft limit of the biz prod bulk sms whole number cannot be greater than (10^9)-1.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_CREDIT_LIMIT_WHOLE_NUMBER_CANNOT_BE_GREATER_THAN_(10^9)-1 - Credit limit of the biz prod bulk sms whole number cannot be greater than (10^9)-1.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_DEPOSIT_WHOLE_NUMBER_CANNOT_BE_GREATER_THAN_(10^9)-1 - Deposit of the biz prod bulk sms whole number cannot be greater than (10^9)-1.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_BANK_GUARANTEE_WHOLE_NUMBER_CANNOT_BE_GREATER_THAN_(10^9)-1 - Bank guarantee of the biz prod bulk sms whole number cannot be greater than (10^9)-1.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_DISPUTE_PERCENT_WHOLE_NUMBER_CANNOT_BE_GREATER_THAN_99 - Dispute percent of the biz prod bulk sms whole number cannot be greater than 99.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_MAX_DISPUTE_WHOLE_NUMBER_CANNOT_BE_GREATER_THAN_(10^9)-1 - Max dispute of the biz prod bulk sms whole number cannot be greater than (10^9)-1.
- BIZ_CORE:ANNOUNCEMENT_DAYS_NOT_VALID - Announcement days is not valid.
- BIZ_CORE:BIZ_PRODUCT_BULK_SMS_ANNOUNCEMENT_DAYS_CANNOT_BE_GREATER_THAN_99999 - Announcement days of the biz prod bulk sms cannot be greater than 99999.
Request
Path parameters
partnerIdintegerrequired
Partner ID.
Body
application/json
accountManagerIdinteger
customerTypestring
Possible values:
enterprise, wholesale, inter-companynotesstring
productBulkSmsobject
Show child attributes
announcementDaysinteger
bankGuaranteenumber (float64)
billingCycleinteger
billingCycleUnitstring
Possible values:
Days, Months, Years, Weeks, Quarters, SemesterscreditLimitnumber (float64)
currencyIdinteger
depositnumber (float64)
disputePercentnumber (float64)
invoiceTriggerAmountnumber (float64)
maxDisputenumber (float64)
overdraftLimitnumber (float64)
sellingPaymentDueinteger
sellingPaymentTypestring
Possible values:
prepaid, postpaid, nonevalidFromDstring (date)
productIdinteger
productTypeinteger
relationTypeIdinteger
statusstring
Possible values:
enabled, suspended, disabled, archivedRequest example
C# · HttpClient
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <access_token>");
var content = new StringContent("{\"accountManagerId\":0,\"customerType\":\"enterprise\",\"notes\":\"string\",\"productBulkSms\":{\"announcementDays\":0,\"bankGuarantee\":0,\"billingCycle\":0,\"billingCycleUnit\":\"Days\",\"creditLimit\":0,\"currencyId\":0,\"deposit\":0,\"disputePercent\":0,\"invoiceTriggerAmount\":0,\"maxDispute\":0,\"overdraftLimit\":0,\"sellingPaymentDue\":0,\"sellingPaymentType\":\"prepaid\",\"validFromD\":\"2026-01-01\"},\"productId\":0,\"productType\":0,\"relationTypeId\":0,\"status\":\"enabled\"}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());C# · RestSharp
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer <access_token>");
var body = "{\"accountManagerId\":0,\"customerType\":\"enterprise\",\"notes\":\"string\",\"productBulkSms\":{\"announcementDays\":0,\"bankGuarantee\":0,\"billingCycle\":0,\"billingCycleUnit\":\"Days\",\"creditLimit\":0,\"currencyId\":0,\"deposit\":0,\"disputePercent\":0,\"invoiceTriggerAmount\":0,\"maxDispute\":0,\"overdraftLimit\":0,\"sellingPaymentDue\":0,\"sellingPaymentType\":\"prepaid\",\"validFromD\":\"2026-01-01\"},\"productId\":0,\"productType\":0,\"relationTypeId\":0,\"status\":\"enabled\"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);cURL · cURL
curl -L -X POST "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <access_token>" \
--data-raw '{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}'Dart · dio
var headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
};
var data = json.encode({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
});
var dio = Dio();
var response = await dio.request(
'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products',
options: Options(
method: 'POST',
headers: headers,
),
data: data,
);
if (response.statusCode == 200) {
print(json.encode(response.data));
}
else {
print(response.statusMessage);
}Dart · http
var headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
};
var request = http.Request('POST', Uri.parse('https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products'));
request.body = json.encode({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}Go · Native
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products"
method := "POST"
payload := strings.NewReader(`{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <access_token>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}HTTP · HTTP
POST /biz-core/v2/biz-partners/{partnerId}/biz-partner-products HTTP/1.1
Host: api-cpaas.sms.es
Content-Type: application/json
Accept: application/json
Authorization: Bearer <access_token>
Content-Length: 436
{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}Java · OkHttp
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"accountManagerId\":0,\"customerType\":\"enterprise\",\"notes\":\"string\",\"productBulkSms\":{\"announcementDays\":0,\"bankGuarantee\":0,\"billingCycle\":0,\"billingCycleUnit\":\"Days\",\"creditLimit\":0,\"currencyId\":0,\"deposit\":0,\"disputePercent\":0,\"invoiceTriggerAmount\":0,\"maxDispute\":0,\"overdraftLimit\":0,\"sellingPaymentDue\":0,\"sellingPaymentType\":\"prepaid\",\"validFromD\":\"2026-01-01\"},\"productId\":0,\"productType\":0,\"relationTypeId\":0,\"status\":\"enabled\"}");
Request request = new Request.Builder()
.url("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer <access_token>")
.build();
Response response = client.newCall(request).execute();Java · Unirest
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("Authorization", "Bearer <access_token>")
.body("{\"accountManagerId\":0,\"customerType\":\"enterprise\",\"notes\":\"string\",\"productBulkSms\":{\"announcementDays\":0,\"bankGuarantee\":0,\"billingCycle\":0,\"billingCycleUnit\":\"Days\",\"creditLimit\":0,\"currencyId\":0,\"deposit\":0,\"disputePercent\":0,\"invoiceTriggerAmount\":0,\"maxDispute\":0,\"overdraftLimit\":0,\"sellingPaymentDue\":0,\"sellingPaymentType\":\"prepaid\",\"validFromD\":\"2026-01-01\"},\"productId\":0,\"productType\":0,\"relationTypeId\":0,\"status\":\"enabled\"}")
.asString();JavaScript · Fetch
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer <access_token>");
const raw = JSON.stringify({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));JavaScript · jQuery
var settings = {
"url": "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
},
"data": JSON.stringify({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
})
};
$.ajax(settings).done(function (response) {
console.log(response);
});JavaScript · XHR
var data = JSON.stringify({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer <access_token>");
xhr.send(data);Kotlin · OkHttp
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = """
{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}
""".trimIndent().toRequestBody(mediaType)
val request = Request.Builder()
.url("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer <access_token>")
.build()
val response = client.newCall(request).execute()C · libcurl
#include <stdio.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
headers = curl_slist_append(headers, "Accept: application/json");
headers = curl_slist_append(headers, "Authorization: Bearer <access_token>");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "{\"accountManagerId\":0,\"customerType\":\"enterprise\",\"notes\":\"string\",\"productBulkSms\":{\"announcementDays\":0,\"bankGuarantee\":0,\"billingCycle\":0,\"billingCycleUnit\":\"Days\",\"creditLimit\":0,\"currencyId\":0,\"deposit\":0,\"disputePercent\":0,\"invoiceTriggerAmount\":0,\"maxDispute\":0,\"overdraftLimit\":0,\"sellingPaymentDue\":0,\"sellingPaymentType\":\"prepaid\",\"validFromD\":\"2026-01-01\"},\"productId\":0,\"productType\":0,\"relationTypeId\":0,\"status\":\"enabled\"}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
CURLcode res = curl_easy_perform(curl);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}Node.js · Axios
const axios = require('axios');
let data = JSON.stringify({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});Node.js · Native
const https = require('follow-redirects').https;
const fs = require('fs');
let options = {
'method': 'POST',
'hostname': 'api-cpaas.sms.es',
'path': '/biz-core/v2/biz-partners/{partnerId}/biz-partner-products',
'headers': {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
},
'maxRedirects': 20
};
const req = https.request(options, function (res) {
let chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
let body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
let postData = JSON.stringify({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
});
req.write(postData);
req.end();Objective-C · NSURLSession
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Content-Type": @"application/json",
@"Accept": @"application/json",
@"Authorization": @"Bearer <access_token>"
};
[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\"accountManagerId\":0,\"customerType\":\"enterprise\",\"notes\":\"string\",\"productBulkSms\":{\"announcementDays\":0,\"bankGuarantee\":0,\"billingCycle\":0,\"billingCycleUnit\":\"Days\",\"creditLimit\":0,\"currencyId\":0,\"deposit\":0,\"disputePercent\":0,\"invoiceTriggerAmount\":0,\"maxDispute\":0,\"overdraftLimit\":0,\"sellingPaymentDue\":0,\"sellingPaymentType\":\"prepaid\",\"validFromD\":\"2026-01-01\"},\"productId\":0,\"productType\":0,\"relationTypeId\":0,\"status\":\"enabled\"}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);OCaml · Cohttp
open Lwt
open Cohttp
open Cohttp_lwt_unix
let postData = ref {|{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}|};;
let reqBody =
let uri = Uri.of_string "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products" in
let headers = Header.init ()
|> fun h -> Header.add h "Content-Type" "application/json"
|> fun h -> Header.add h "Accept" "application/json"
|> fun h -> Header.add h "Authorization" "Bearer <access_token>"
in
let body = Cohttp_lwt.Body.of_string !postData in
Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)PHP · cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer <access_token>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
PHP · Guzzle
<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer <access_token>'
];
$body = '{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}';
$request = new Request('POST', 'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
PowerShell · RestMethod
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Accept", "application/json")
$headers.Add("Authorization", "Bearer <access_token>")
$body = @"
{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}
"@
$response = Invoke-RestMethod "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products" -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-JsonPython · Requests
import requests
import json
url = "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products"
payload = json.dumps({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
})
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)Python · http.client
import http.client
import json
conn = http.client.HTTPSConnection("api-cpaas.sms.es")
payload = json.dumps({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
})
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
}
conn.request("POST", "/biz-core/v2/biz-partners/{partnerId}/biz-partner-products", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))R · httr
library(httr)
headers = c(
'Content-Type' = 'application/json',
'Accept' = 'application/json',
'Authorization' = 'Bearer <access_token>'
)
body = '{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}';
res <- VERB("POST", url = "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products", body = body, add_headers(headers))
cat(content(res, 'text'))Ruby · Net::HTTP
require "uri"
require "json"
require "net/http"
url = URI("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Bearer <access_token>"
request.body = JSON.dump({
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
})
response = https.request(request)
puts response.read_body
Rust · reqwest
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::builder()
.build()?;
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("Content-Type", "application/json".parse()?);
headers.insert("Accept", "application/json".parse()?);
headers.insert("Authorization", "Bearer <access_token>".parse()?);
let data = r#"{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}"#;
let json: serde_json::Value = serde_json::from_str(&data)?;
let request = client.request(reqwest::Method::from_bytes(b"POST")?, "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products")
.headers(headers)
.json(&json);
let response = request.send().await?;
let body = response.text().await?;
println!("{}", body);
Ok(())
}Shell · Httpie
printf '{"accountManagerId":0,"customerType":"enterprise","notes":"string","productBulkSms":{"announcementDays":0,"bankGuarantee":0,"billingCycle":0,"billingCycleUnit":"Days","creditLimit":0,"currencyId":0,"deposit":0,"disputePercent":0,"invoiceTriggerAmount":0,"maxDispute":0,"overdraftLimit":0,"sellingPaymentDue":0,"sellingPaymentType":"prepaid","validFromD":"2026-01-01"},"productId":0,"productType":0,"relationTypeId":0,"status":"enabled"}' | http --follow --timeout 3600 POST "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products" \
'Content-Type':'application/json' \
'Accept':'application/json' \
'Authorization':'Bearer <access_token>'Shell · wget
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <access_token>' \
--body-data '{"accountManagerId":0,"customerType":"enterprise","notes":"string","productBulkSms":{"announcementDays":0,"bankGuarantee":0,"billingCycle":0,"billingCycleUnit":"Days","creditLimit":0,"currencyId":0,"deposit":0,"disputePercent":0,"invoiceTriggerAmount":0,"maxDispute":0,"overdraftLimit":0,"sellingPaymentDue":0,"sellingPaymentType":"prepaid","validFromD":"2026-01-01"},"productId":0,"productType":0,"relationTypeId":0,"status":"enabled"}' \
'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products'Swift · URLSession
let parameters = """
{
"accountManagerId": 0,
"customerType": "enterprise",
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "Days",
"creditLimit": 0,
"currencyId": 0,
"deposit": 0,
"disputePercent": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "prepaid",
"validFromD": "2026-01-01"
},
"productId": 0,
"productType": 0,
"relationTypeId": 0,
"status": "enabled"
}
"""
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{partnerId}/biz-partner-products")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("application/json", forHTTPHeaderField: "Accept")
request.addValue("Bearer <access_token>", forHTTPHeaderField: "Authorization")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()Responses
- 200
- default
BizPartnerProduct data created successfully
application/json
accountManagerIdinteger
accountManagerNamestring
bizPartnerBriefNamestring
bizPartnerIdinteger
customerTypestring
disabledDtstring (date-time)
enabledDtstring (date-time)
idinteger
notesstring
productBulkSmsobject
Show child attributes
announcementDaysinteger
bankGuaranteenumber (float64)
billingCycleinteger
billingCycleUnitstring
bizpProductIdinteger
creditLimitnumber (float64)
currencyCodestring
currencyIdinteger
currencyNamestring
depositnumber (float64)
disputePercentnumber (float64)
idinteger
invoiceTriggerAmountnumber (float64)
maxDisputenumber (float64)
overdraftLimitnumber (float64)
sellingPaymentDueinteger
sellingPaymentTypestring
validFromDstring (date)
productCodeNamestring
productIdinteger
productNamestring
productTypeCodeNamestring
productTypeNamestring
relationTypeCodeNamestring
relationTypeIdinteger
relationTypeNamestring
serviceCategoryIdinteger
serviceProductNamestring
statusstring
statusDtstring (date-time)
Example response
{
"accountManagerId": 0,
"accountManagerName": "string",
"bizPartnerBriefName": "string",
"bizPartnerId": 0,
"customerType": "string",
"disabledDt": "2026-01-01T12:00:00Z",
"enabledDt": "2026-01-01T12:00:00Z",
"id": 0,
"notes": "string",
"productBulkSms": {
"announcementDays": 0,
"bankGuarantee": 0,
"billingCycle": 0,
"billingCycleUnit": "string",
"bizpProductId": 0,
"creditLimit": 0,
"currencyCode": "string",
"currencyId": 0,
"currencyName": "string",
"deposit": 0,
"disputePercent": 0,
"id": 0,
"invoiceTriggerAmount": 0,
"maxDispute": 0,
"overdraftLimit": 0,
"sellingPaymentDue": 0,
"sellingPaymentType": "string",
"validFromD": "2026-01-01"
},
"productCodeName": "string",
"productId": 0,
"productName": "string",
"productTypeCodeName": "string",
"productTypeName": "string",
"relationTypeCodeName": "string",
"relationTypeId": 0,
"relationTypeName": "string",
"serviceCategoryId": 0,
"serviceProductName": "string",
"status": "string",
"statusDt": "2026-01-01T12:00:00Z"
}unexpected error
application/json
Codeinteger (int32)required
Messagestringrequired
Example response
{
"Code": 0,
"Message": "string"
}