cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/booking/BOOKING_ID/lines/LINE_UUID/billing_preferences" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"order": {
"line": {
"item_properties": {
"charging_start_date": "SUBSCRIPTION_START_DATE"
}
}
}
}'from exsited import build_client
client = build_client()
response = client.bookings.update_booking_line_billing_preferences(
"BOOKING_ID",
"LINE_UUID",
{
"order": {
"line": {
"item_properties": {"charging_start_date": "SUBSCRIPTION_START_DATE"}
}
}
},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.bookings.updateBookingLineBillingPreferences('BOOKING_ID', 'LINE_UUID', {
order: {line: {item_properties: {charging_start_date: 'SUBSCRIPTION_START_DATE'}}},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->bookings->updateBookingLineBillingPreferences('BOOKING_ID', 'LINE_UUID', [
'order' => [
'line' => ['item_properties' => ['charging_start_date' => 'SUBSCRIPTION_START_DATE']],
],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.bookings.bookings_dto.BookingsDto.BookingById;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<BookingById> response = client.bookings().updateBookingLineBillingPreferences(
"BOOKING_ID",
"LINE_UUID",
Map.of(
"order", Map.of(
"line", Map.of(
"item_properties", Map.of(
"charging_start_date", "SUBSCRIPTION_START_DATE")))));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Bookings.UpdateBookingLineBillingPreferencesAsync(
"BOOKING_ID",
"LINE_UUID",
new Dictionary<string, object?>
{
["order"] = new Dictionary<string, object?>
{
["line"] = new Dictionary<string, object?>
{
["item_properties"] = new Dictionary<string, object?>
{
["charging_start_date"] = "SUBSCRIPTION_START_DATE",
},
},
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.bookings.updateBookingLineBillingPreferences(
'BOOKING_ID',
'LINE_UUID',
{
'order': {
'line': {
'item_properties': {'charging_start_date': 'SUBSCRIPTION_START_DATE'},
},
},
},
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Bookings().UpdateBookingLineBillingPreferences(context.Background(), "BOOKING_ID", "LINE_UUID", map[string]any{
"order": map[string]any{
"line": map[string]any{
"item_properties": map[string]any{
"charging_start_date": "SUBSCRIPTION_START_DATE",
},
},
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"order": {
"account": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"activity_logs": "<array>",
"allow_contract": true,
"billing_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_line_3": null,
"address_line_4": null,
"address_line_5": null,
"city": "<string>",
"country": "<string>",
"name": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"billing_preferences": {
"billing_period": "<string>",
"communication_profile": "<string>",
"consolidate_invoice": true,
"fulfillment_mode": "<string>",
"fulfillment_term": "<string>",
"invoice_mode": "<string>",
"invoice_term": "<string>",
"payment_mode": "<string>",
"payment_processor": "<string>",
"payment_term": "<string>",
"payment_term_alignment": "<string>",
"proforma_properties": {
"acceptance_date": null,
"acceptance_required": true,
"acceptance_term": null,
"payment_required": true,
"terms_and_conditions": null
}
},
"billing_start_date": "<string>",
"communication_preferences": [
{
"channel": "<string>",
"enabled": true
}
],
"created_by": null,
"created_on": "<string>",
"currency": {
"code": "<string>",
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"custom_attributes": [
{
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"type": "<string>",
"value": "<string>"
}
],
"custom_form": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"customer_purchase_order_id": "<string>",
"description": "<string>",
"discount_profile": null,
"display_name": "<string>",
"id": "<string>",
"invoice_note": "<string>",
"kpis": {
"deleted_at": null,
"estimated_total": "<string>",
"last_cancelled_at": null,
"last_changed_at": null,
"last_invoice_issue_date": null,
"last_invoice_total": "<string>",
"last_reactivated_at": null,
"monthly_recurring_revenue": "<string>",
"next_invoice_issue_date": null,
"object": "<string>",
"start_date": null,
"total_collected": "<string>",
"total_due": "<string>",
"total_invoice": 123,
"total_outstanding": "<string>",
"total_revenue": "<string>"
},
"last_updated_by": null,
"last_updated_on": "<string>",
"lines": [
{
"charge_item_uuid": "<string>",
"expected_delivery_date": "<string>",
"id": "<string>",
"item": {
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"uuid": "<string>"
},
"item_accounting_code": {
"sales_revenue": "<unknown>"
},
"item_charge_type": "<string>",
"item_custom_attributes": "<array>",
"item_description": "<string>",
"item_invoice_note": "<string>",
"item_order_quantity": 123,
"item_price_snapshot": {
"pricing_rule": {
"price": 123,
"price_period": "<string>",
"price_type": "<string>",
"pricing_level": "<string>",
"pricing_method": "<string>",
"pricing_schedule": "<string>",
"uom": "<string>",
"uuid": "<string>",
"version": "<string>",
"warehouse": "<string>"
}
},
"item_price_tax": {
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"rate": 123
},
"item_properties": {
"billing_mode": "<string>",
"charging_and_billing_alignment": "<string>",
"charging_start_date": "<string>",
"pro_rata_partial_pricing_period": "<string>"
},
"item_sale_tax_configuration": {
"sale_price_is_based_on": "<string>",
"tax_code": {
"code": "<string>",
"link": "<string>",
"rate": "<string>",
"uuid": "<string>"
}
},
"item_type": "<string>",
"object": "<string>",
"pre_order_stock_details": {
"pending_reserve": "<string>",
"reserved": "<string>",
"sold": "<string>"
},
"shipping_cost": 123,
"subtotal": "<string>",
"tax": "<string>",
"tax_exempt_when_sold": true,
"total": "<string>",
"version": 123
}
],
"manager": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"name": "<string>",
"next_billing_from_date": "<string>",
"next_billing_from_date_utc": "<string>",
"object": "<string>",
"order_start_date": "<string>",
"order_type": "<string>",
"origin": "<string>",
"original_total": null,
"pre_order": true,
"price_tax_inclusive": true,
"quote_converted": true,
"quote_order": true,
"referral_account": null,
"sales_rep": null,
"shipping_address": null,
"shipping_cost": 123,
"shipping_line_items": "<array>",
"shipping_profile": null,
"status": "<string>",
"subtotal": "<string>",
"tax": "<string>",
"time_zone": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"total": "<string>",
"version": 123
}
}Bookings
Update a booking line's billing preferences
Changes the billing settings of one line and returns the whole booking.
PATCH
/
booking
/
{booking_id}
/
lines
/
{line_uuid}
/
billing_preferences
cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/booking/BOOKING_ID/lines/LINE_UUID/billing_preferences" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"order": {
"line": {
"item_properties": {
"charging_start_date": "SUBSCRIPTION_START_DATE"
}
}
}
}'from exsited import build_client
client = build_client()
response = client.bookings.update_booking_line_billing_preferences(
"BOOKING_ID",
"LINE_UUID",
{
"order": {
"line": {
"item_properties": {"charging_start_date": "SUBSCRIPTION_START_DATE"}
}
}
},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.bookings.updateBookingLineBillingPreferences('BOOKING_ID', 'LINE_UUID', {
order: {line: {item_properties: {charging_start_date: 'SUBSCRIPTION_START_DATE'}}},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->bookings->updateBookingLineBillingPreferences('BOOKING_ID', 'LINE_UUID', [
'order' => [
'line' => ['item_properties' => ['charging_start_date' => 'SUBSCRIPTION_START_DATE']],
],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.bookings.bookings_dto.BookingsDto.BookingById;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<BookingById> response = client.bookings().updateBookingLineBillingPreferences(
"BOOKING_ID",
"LINE_UUID",
Map.of(
"order", Map.of(
"line", Map.of(
"item_properties", Map.of(
"charging_start_date", "SUBSCRIPTION_START_DATE")))));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Bookings.UpdateBookingLineBillingPreferencesAsync(
"BOOKING_ID",
"LINE_UUID",
new Dictionary<string, object?>
{
["order"] = new Dictionary<string, object?>
{
["line"] = new Dictionary<string, object?>
{
["item_properties"] = new Dictionary<string, object?>
{
["charging_start_date"] = "SUBSCRIPTION_START_DATE",
},
},
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.bookings.updateBookingLineBillingPreferences(
'BOOKING_ID',
'LINE_UUID',
{
'order': {
'line': {
'item_properties': {'charging_start_date': 'SUBSCRIPTION_START_DATE'},
},
},
},
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Bookings().UpdateBookingLineBillingPreferences(context.Background(), "BOOKING_ID", "LINE_UUID", map[string]any{
"order": map[string]any{
"line": map[string]any{
"item_properties": map[string]any{
"charging_start_date": "SUBSCRIPTION_START_DATE",
},
},
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"order": {
"account": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"activity_logs": "<array>",
"allow_contract": true,
"billing_address": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_line_3": null,
"address_line_4": null,
"address_line_5": null,
"city": "<string>",
"country": "<string>",
"name": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"billing_preferences": {
"billing_period": "<string>",
"communication_profile": "<string>",
"consolidate_invoice": true,
"fulfillment_mode": "<string>",
"fulfillment_term": "<string>",
"invoice_mode": "<string>",
"invoice_term": "<string>",
"payment_mode": "<string>",
"payment_processor": "<string>",
"payment_term": "<string>",
"payment_term_alignment": "<string>",
"proforma_properties": {
"acceptance_date": null,
"acceptance_required": true,
"acceptance_term": null,
"payment_required": true,
"terms_and_conditions": null
}
},
"billing_start_date": "<string>",
"communication_preferences": [
{
"channel": "<string>",
"enabled": true
}
],
"created_by": null,
"created_on": "<string>",
"currency": {
"code": "<string>",
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"custom_attributes": [
{
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"type": "<string>",
"value": "<string>"
}
],
"custom_form": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"customer_purchase_order_id": "<string>",
"description": "<string>",
"discount_profile": null,
"display_name": "<string>",
"id": "<string>",
"invoice_note": "<string>",
"kpis": {
"deleted_at": null,
"estimated_total": "<string>",
"last_cancelled_at": null,
"last_changed_at": null,
"last_invoice_issue_date": null,
"last_invoice_total": "<string>",
"last_reactivated_at": null,
"monthly_recurring_revenue": "<string>",
"next_invoice_issue_date": null,
"object": "<string>",
"start_date": null,
"total_collected": "<string>",
"total_due": "<string>",
"total_invoice": 123,
"total_outstanding": "<string>",
"total_revenue": "<string>"
},
"last_updated_by": null,
"last_updated_on": "<string>",
"lines": [
{
"charge_item_uuid": "<string>",
"expected_delivery_date": "<string>",
"id": "<string>",
"item": {
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"uuid": "<string>"
},
"item_accounting_code": {
"sales_revenue": "<unknown>"
},
"item_charge_type": "<string>",
"item_custom_attributes": "<array>",
"item_description": "<string>",
"item_invoice_note": "<string>",
"item_order_quantity": 123,
"item_price_snapshot": {
"pricing_rule": {
"price": 123,
"price_period": "<string>",
"price_type": "<string>",
"pricing_level": "<string>",
"pricing_method": "<string>",
"pricing_schedule": "<string>",
"uom": "<string>",
"uuid": "<string>",
"version": "<string>",
"warehouse": "<string>"
}
},
"item_price_tax": {
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"rate": 123
},
"item_properties": {
"billing_mode": "<string>",
"charging_and_billing_alignment": "<string>",
"charging_start_date": "<string>",
"pro_rata_partial_pricing_period": "<string>"
},
"item_sale_tax_configuration": {
"sale_price_is_based_on": "<string>",
"tax_code": {
"code": "<string>",
"link": "<string>",
"rate": "<string>",
"uuid": "<string>"
}
},
"item_type": "<string>",
"object": "<string>",
"pre_order_stock_details": {
"pending_reserve": "<string>",
"reserved": "<string>",
"sold": "<string>"
},
"shipping_cost": 123,
"subtotal": "<string>",
"tax": "<string>",
"tax_exempt_when_sold": true,
"total": "<string>",
"version": 123
}
],
"manager": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"name": "<string>",
"next_billing_from_date": "<string>",
"next_billing_from_date_utc": "<string>",
"object": "<string>",
"order_start_date": "<string>",
"order_type": "<string>",
"origin": "<string>",
"original_total": null,
"pre_order": true,
"price_tax_inclusive": true,
"quote_converted": true,
"quote_order": true,
"referral_account": null,
"sales_rep": null,
"shipping_address": null,
"shipping_cost": 123,
"shipping_line_items": "<array>",
"shipping_profile": null,
"status": "<string>",
"subtotal": "<string>",
"tax": "<string>",
"time_zone": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"total": "<string>",
"version": 123
}
}Send the settings under
order.line.item_properties, not under billing_preferences, such as charging_start_date. The example targets a metered line. The whole booking comes back under order. SUBSCRIPTION_START_DATE is a literal value, not a placeholder.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Path Parameters
The booking's id. Any order's id works here, whatever the order's type.
The id of one of the booking's lines.
Body
application/json
Show child attributes
Show child attributes
Response
200 - application/json
The whole booking, under order.
Show child attributes
Show child attributes