Skip to main content

Actions

The ballerinax/sap.businessone.sales package exposes the following clients:

Available clients:

ClientPurpose
ClientManages SAP Business One sales (A/R) documents — quotations, orders & delivery notes, A/R invoices, credit notes & down payments, returns, return requests & correction invoices, blanket agreements & sales tax invoices, dunning terms & letters, sales persons & commission groups, and POS daily summaries — over the session-authenticated Service Layer (OData V3).

Client

The Client provides access to the sales (A/R) documents exposed by the SAP Business One Service Layer — quotations, orders, delivery notes, invoices, credit notes, down payments, drafts, returns, return requests, correction invoices and their reversals, blanket agreements, sales tax invoices, dunning terms and letters, sales persons, commission groups, and POS daily summaries.

Configuration

SessionConfig

SAP Business One Service Layer session credentials, passed as the first argument to the client initializer.

FieldTypeDefaultDescription
companyDbstringRequiredThe SAP Business One company database to log in to
usernamestringRequiredThe Service Layer user name
passwordstringRequiredThe Service Layer user password

ConnectionConfig

Provides a set of configurations for controlling the behaviours when communicating with the Service Layer HTTP endpoint. Passed as the optional second argument to the client initializer.

FieldTypeDefaultDescription
httpVersionhttp:HttpVersionhttp:HTTP_2_0The HTTP version understood by the client
http1Settingshttp:ClientHttp1SettingsConfigurations related to HTTP/1.x protocol
http2Settingshttp:ClientHttp2SettingsConfigurations related to HTTP/2 protocol
timeoutdecimal30The maximum time to wait (in seconds) for a response before closing the connection
forwardedstring"disable"The choice of setting forwarded/x-forwarded header
followRedirectshttp:FollowRedirectsOptionalConfigurations associated with redirection
poolConfighttp:PoolConfigurationOptionalConfigurations associated with request pooling
cachehttp:CacheConfigHTTP caching related configurations
compressionhttp:Compressionhttp:COMPRESSION_AUTOSpecifies the way of handling compression (accept-encoding) header
circuitBreakerhttp:CircuitBreakerConfigOptionalConfigurations associated with the behaviour of the Circuit Breaker
retryConfighttp:RetryConfigOptionalConfigurations associated with retrying
cookieConfighttp:CookieConfigOptionalConfigurations associated with cookies
responseLimitshttp:ResponseLimitConfigsConfigurations associated with inbound response size limits
secureSockethttp:ClientSecureSocketOptionalSSL/TLS-related options
proxyhttp:ProxyConfigOptionalProxy server related options
socketConfighttp:ClientSocketConfigProvides settings related to client socket configuration
validationbooleantrueEnables the inbound payload validation functionality provided by the constraint package
laxDataBindingbooleantrueEnables relaxed data binding on the client side, treating nil values and absent fields as optional

The client also accepts a serviceUrl string parameter — the base URL of the target Service Layer instance — which defaults to https://localhost:50000/b1s/v1.

Initializing the client

import ballerinax/sap.businessone;
import ballerinax/sap.businessone.sales;

businessone:SessionConfig session = {
companyDb: "SBODemoUS",
username: "manager",
password: "<password>"
};

sales:Client client = check new (session, serviceUrl = "https://<host>:50000/b1s/v1");

Operations

CorrectionInvoiceReversal

listCorrectionInvoiceReversal

Queries the CorrectionInvoiceReversal collection and returns a page of correction invoice reversal documents, with optional OData query options for filtering, paging, sorting, and field selection.

Parameters:

NameTypeRequiredDescription
headersListCorrectionInvoiceReversalHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100
queriesListCorrectionInvoiceReversalQueriesNoOData query options such as $filter, $top, $skip, $orderby, $select, $expand, and $inlinecount

Returns: CorrectionInvoiceReversalCollectionResponse|error

Sample code:

CorrectionInvoiceReversalCollectionResponse response = check client->listCorrectionInvoiceReversal();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#CorrectionInvoiceReversal",
"value": [
{
"DocEntry": 15,
"DocNum": 15,
"DocDate": "2026-05-01",
"CardCode": "C20000",
"CardName": "Maxi-Teq",
"DocTotal": 1250.50,
"DocCurrency": "EUR"
}
],
"odata.nextLink": "CorrectionInvoiceReversal?$skip=20"
}
createCorrectionInvoiceReversal

Creates a new correction invoice reversal document in the CorrectionInvoiceReversal collection and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesThe correction invoice reversal document to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document created = check client->createCorrectionInvoiceReversal(payload);

Sample response:

{
"DocEntry": 16,
"DocNum": 16,
"DocDate": "2026-05-02",
"CardCode": "C20000",
"CardName": "Maxi-Teq",
"DocTotal": 890.00,
"DocCurrency": "EUR"
}
getCorrectionInvoiceReversal

Retrieves a single correction invoice reversal document by its DocEntry key, with optional $select and $expand query options.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetCorrectionInvoiceReversalQueriesNoOData query options such as $select and $expand

Returns: Document|error

Sample code:

Document document = check client->getCorrectionInvoiceReversal(15);

Sample response:

{
"DocEntry": 15,
"DocNum": 15,
"DocDate": "2026-05-01",
"CardCode": "C20000",
"CardName": "Maxi-Teq",
"DocTotal": 1250.50,
"DocCurrency": "EUR",
"Comments": "Reversal for correction invoice 12"
}
deleteCorrectionInvoiceReversal

Deletes the correction invoice reversal document identified by the given DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteCorrectionInvoiceReversal(15);
updateCorrectionInvoiceReversal

Partially updates a correction invoice reversal document (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesThe fields of the document to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateCorrectionInvoiceReversal(15, {Comments: "Updated remarks"});
correctionInvoiceReversalCancel

Invokes the bound action 'Cancel' on a correction invoice reversal document (binding type Document) to cancel it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->correctionInvoiceReversalCancel(15);
correctionInvoiceReversalClose

Invokes the bound action 'Close' on a correction invoice reversal document (binding type Document) to close it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->correctionInvoiceReversalClose(15);
correctionInvoiceReversalCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a correction invoice reversal document (binding type Document) and returns the generated cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document cancellation = check client->correctionInvoiceReversalCreateCancellationDocument(15);

Sample response:

{
"DocEntry": 17,
"DocNum": 17,
"DocDate": "2026-05-03",
"CardCode": "C20000",
"DocTotal": -1250.50,
"DocCurrency": "EUR"
}
correctionInvoiceReversalReopen

Invokes the bound action 'Reopen' on a correction invoice reversal document (binding type Document) to reopen a closed document; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->correctionInvoiceReversalReopen(15);
correctionInvoiceReversalServiceApproveAndAdd

Approves and adds a correction invoice reversal document via the CorrectionInvoiceReversalService_ApproveAndAdd service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceReversalService_ApproveAndAdd_bodyYesRequest payload wrapping the Document to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->correctionInvoiceReversalServiceApproveAndAdd({document: {CardCode: "C20000"}});
correctionInvoiceReversalServiceApproveAndUpdate

Approves and updates a correction invoice reversal document via the CorrectionInvoiceReversalService_ApproveAndUpdate service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceReversalService_ApproveAndUpdate_bodyYesRequest payload wrapping the Document to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->correctionInvoiceReversalServiceApproveAndUpdate({document: {DocEntry: 15}});
correctionInvoiceReversalServiceCloseByDate

Closes correction invoice reversal documents by date via the CorrectionInvoiceReversalService_CloseByDate service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceReversalService_CloseByDate_bodyYesRequest payload wrapping DocumentCloseParams (document entry, specified closing date, and closing option)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->correctionInvoiceReversalServiceCloseByDate({documentCloseParams: {docEntry: 15}});
correctionInvoiceReversalServiceExportEWayBill

Exports an e-way bill for a correction invoice reversal document via the CorrectionInvoiceReversalService_ExportEWayBill service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceReversalService_ExportEWayBill_bodyYesRequest payload wrapping the Document for which to export the e-way bill
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->correctionInvoiceReversalServiceExportEWayBill({document: {DocEntry: 15}});
correctionInvoiceReversalServiceGetApprovalTemplates

Gets the approval templates applicable to a correction invoice reversal document via the CorrectionInvoiceReversalService_GetApprovalTemplates service operation.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceReversalService_GetApprovalTemplates_bodyYesRequest payload wrapping the Document to evaluate against approval templates
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->correctionInvoiceReversalServiceGetApprovalTemplates({document: {CardCode: "C20000"}});

Sample response:

{
"DocEntry": 15,
"DocumentApprovalRequests": [
{
"ApprovalTemplatesID": 1,
"Remarks": "Requires manager approval"
}
]
}
correctionInvoiceReversalServiceHandleApprovalRequest

Handles a pending approval request for the CorrectionInvoiceReversal service via the CorrectionInvoiceReversalService_HandleApprovalRequest service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->correctionInvoiceReversalServiceHandleApprovalRequest();
correctionInvoiceReversalServiceInitData

Initializes and returns a correction invoice reversal document with default data via the CorrectionInvoiceReversalService_InitData service operation.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document initial = check client->correctionInvoiceReversalServiceInitData();

Sample response:

{
"DocDate": "2026-05-01",
"DocDueDate": "2026-05-31",
"DocCurrency": "EUR",
"Series": 4
}

DownPayments

listDownPayments

Queries the DownPayments collection and returns a page of down payment documents, with optional OData query options for filtering, paging, sorting, and field selection.

Parameters:

NameTypeRequiredDescription
headersListDownPaymentsHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100
queriesListDownPaymentsQueriesNoOData query options such as $filter, $top, $skip, $orderby, $select, $expand, and $inlinecount

Returns: DownPaymentsCollectionResponse|error

Sample code:

DownPaymentsCollectionResponse response = check client->listDownPayments();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#DownPayments",
"value": [
{
"DocEntry": 42,
"DocNum": 42,
"DocDate": "2026-04-20",
"CardCode": "C30000",
"CardName": "Microchips",
"DocTotal": 500.00,
"DocCurrency": "EUR"
}
],
"odata.nextLink": "DownPayments?$skip=20"
}
createDownPayments

Creates a new down payment document in the DownPayments collection and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesThe down payment document to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document created = check client->createDownPayments(payload);

Sample response:

{
"DocEntry": 43,
"DocNum": 43,
"DocDate": "2026-04-21",
"CardCode": "C30000",
"CardName": "Microchips",
"DocTotal": 750.00,
"DocCurrency": "EUR"
}
getDownPayments

Retrieves a single down payment document by its DocEntry key, with optional $select and $expand query options.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetDownPaymentsQueriesNoOData query options such as $select and $expand

Returns: Document|error

Sample code:

Document document = check client->getDownPayments(42);

Sample response:

{
"DocEntry": 42,
"DocNum": 42,
"DocDate": "2026-04-20",
"CardCode": "C30000",
"CardName": "Microchips",
"DocTotal": 500.00,
"DocCurrency": "EUR",
"Comments": "Down payment for sales order 101"
}
deleteDownPayments

Deletes the down payment document identified by the given DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteDownPayments(42);
updateDownPayments

Partially updates a down payment document (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesThe fields of the document to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateDownPayments(42, {Comments: "Updated remarks"});
downPaymentsCancel

Invokes the bound action 'Cancel' on a down payment document (binding type Document) to cancel it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->downPaymentsCancel(42);
downPaymentsClose

Invokes the bound action 'Close' on a down payment document (binding type Document) to close it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->downPaymentsClose(42);
downPaymentsCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a down payment document (binding type Document) and returns the generated cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document cancellation = check client->downPaymentsCreateCancellationDocument(42);

Sample response:

{
"DocEntry": 44,
"DocNum": 44,
"DocDate": "2026-04-22",
"CardCode": "C30000",
"DocTotal": -500.00,
"DocCurrency": "EUR"
}
downPaymentsReopen

Invokes the bound action 'Reopen' on a down payment document (binding type Document) to reopen a closed document; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->downPaymentsReopen(42);
downPaymentsServiceApproveAndAdd

Approves and adds a down payment document via the DownPaymentsService_ApproveAndAdd service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDownPaymentsService_ApproveAndAdd_bodyYesRequest payload wrapping the Document to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->downPaymentsServiceApproveAndAdd({document: {CardCode: "C30000"}});
downPaymentsServiceApproveAndUpdate

Approves and updates a down payment document via the DownPaymentsService_ApproveAndUpdate service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDownPaymentsService_ApproveAndUpdate_bodyYesRequest payload wrapping the Document to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->downPaymentsServiceApproveAndUpdate({document: {DocEntry: 42}});
downPaymentsServiceCloseByDate

Closes down payment documents by date via the DownPaymentsService_CloseByDate service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDownPaymentsService_CloseByDate_bodyYesRequest payload wrapping DocumentCloseParams (document entry, specified closing date, and closing option)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->downPaymentsServiceCloseByDate({documentCloseParams: {docEntry: 42}});
downPaymentsServiceExportEWayBill

Exports an e-way bill for a down payment document via the DownPaymentsService_ExportEWayBill service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDownPaymentsService_ExportEWayBill_bodyYesRequest payload wrapping the Document for which to export the e-way bill
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->downPaymentsServiceExportEWayBill({document: {DocEntry: 42}});
downPaymentsServiceGetApprovalTemplates

Gets the approval templates applicable to a down payment document via the DownPaymentsService_GetApprovalTemplates service operation.

Parameters:

NameTypeRequiredDescription
payloadDownPaymentsService_GetApprovalTemplates_bodyYesRequest payload wrapping the Document to evaluate against approval templates
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->downPaymentsServiceGetApprovalTemplates({document: {CardCode: "C30000"}});

Sample response:

{
"DocEntry": 42,
"DocumentApprovalRequests": [
{
"ApprovalTemplatesID": 2,
"Remarks": "Requires finance approval"
}
]
}
downPaymentsServiceHandleApprovalRequest

Handles a pending approval request for the DownPayments service via the DownPaymentsService_HandleApprovalRequest service operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->downPaymentsServiceHandleApprovalRequest();
downPaymentsServiceInitData

Initializes and returns a down payment document with default data via the DownPaymentsService_InitData service operation.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document initial = check client->downPaymentsServiceInitData();

Sample response:

{
"DocDate": "2026-04-20",
"DocDueDate": "2026-05-20",
"DocCurrency": "EUR",
"Series": 7
}

BlanketAgreements

listBlanketAgreements

Queries the BlanketAgreements collection and returns a page of blanket agreements, with optional OData query options for filtering, paging, sorting, and field selection.

Parameters:

NameTypeRequiredDescription
headersListBlanketAgreementsHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100
queriesListBlanketAgreementsQueriesNoOData query options such as $filter, $top, $skip, $orderby, $select, $expand, and $inlinecount

Returns: BlanketAgreementsCollectionResponse|error

Sample code:

BlanketAgreementsCollectionResponse response = check client->listBlanketAgreements();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#BlanketAgreements",
"value": [
{
"AgreementNo": 1,
"BPCode": "C20000",
"BPName": "Maxi-Teq",
"StartDate": "2026-01-01",
"EndDate": "2026-12-31",
"AgreementType": "atSpecific",
"Status": "asApproved",
"AgreementMethod": "amMonetary"
}
],
"odata.nextLink": "BlanketAgreements?$skip=20"
}
createBlanketAgreements

Creates a new blanket agreement in the BlanketAgreements collection and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadBlanketAgreementYesThe blanket agreement to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: BlanketAgreement|error

Sample code:

BlanketAgreement created = check client->createBlanketAgreements(payload);

Sample response:

{
"AgreementNo": 2,
"BPCode": "C30000",
"BPName": "Microchips",
"StartDate": "2026-02-01",
"EndDate": "2027-01-31",
"AgreementType": "atGeneral",
"Status": "asDraft",
"AgreementMethod": "amItem"
}
getBlanketAgreements

Retrieves a single blanket agreement by its AgreementNo key, with optional $select and $expand query options.

Parameters:

NameTypeRequiredDescription
agreementNoint:Signed32YesKey property 'AgreementNo' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetBlanketAgreementsQueriesNoOData query options such as $select and $expand

Returns: BlanketAgreement|error

Sample code:

BlanketAgreement agreement = check client->getBlanketAgreements(1);

Sample response:

{
"AgreementNo": 1,
"BPCode": "C20000",
"BPName": "Maxi-Teq",
"StartDate": "2026-01-01",
"EndDate": "2026-12-31",
"AgreementType": "atSpecific",
"Status": "asApproved",
"AgreementMethod": "amMonetary",
"Remarks": "Annual supply agreement"
}
deleteBlanketAgreements

Deletes the blanket agreement identified by the given AgreementNo key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
agreementNoint:Signed32YesKey property 'AgreementNo' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteBlanketAgreements(1);
updateBlanketAgreements

Partially updates a blanket agreement (PATCH/MERGE semantics) identified by its AgreementNo key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
agreementNoint:Signed32YesKey property 'AgreementNo' (Edm.Int32)
payloadBlanketAgreementYesThe fields of the blanket agreement to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateBlanketAgreements(1, {Remarks: "Updated terms"});
blanketAgreementsCancelBlanketAgreement

Invokes the bound action 'CancelBlanketAgreement' on a blanket agreement (binding type BlanketAgreement) to cancel it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
agreementNoint:Signed32YesKey property 'AgreementNo' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->blanketAgreementsCancelBlanketAgreement(1);
blanketAgreementsGetRelatedDocuments

Invokes the bound action 'GetRelatedDocuments' on a blanket agreement (binding type BlanketAgreement) and returns the documents related to the agreement.

Parameters:

NameTypeRequiredDescription
agreementNoint:Signed32YesKey property 'AgreementNo' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: inline_response_200|error

Sample code:

inline_response_200 related = check client->blanketAgreementsGetRelatedDocuments(1);

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#Edm.String",
"value": [
{
"DocumentType": "SalesOrder",
"DocumentNo": 101,
"DocumentDate": "2026-03-15",
"ItemNo": "A00001",
"Quantity": 10.0,
"UnitPrice": 25.5,
"AgreementRowNumber": 1
}
]
}
blanketAgreementsServiceGetBlanketAgreementList

Gets the list of blanket agreements via the BlanketAgreementsService_GetBlanketAgreementList service operation.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: inline_response_200_1|error

Sample code:

inline_response_200_1 agreementList = check client->blanketAgreementsServiceGetBlanketAgreementList();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#Edm.String",
"value": [
{"AgreementNo": 1},
{"AgreementNo": 2}
]
}

SalesTaxInvoices

listSalesTaxInvoices

Queries the SalesTaxInvoices collection and returns a page of sales tax invoices, with optional OData query options for filtering, paging, sorting, and field selection.

Parameters:

NameTypeRequiredDescription
headersListSalesTaxInvoicesHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100
queriesListSalesTaxInvoicesQueriesNoOData query options such as $filter, $top, $skip, $orderby, $select, $expand, and $inlinecount

Returns: SalesTaxInvoicesCollectionResponse|error

Sample code:

SalesTaxInvoicesCollectionResponse response = check client->listSalesTaxInvoices();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#SalesTaxInvoices",
"value": [
{
"DocEntry": 7,
"DocNum": 7,
"DocDate": "2026-03-10",
"CardCode": "C20000",
"DocumentTotal": 1180.00,
"TaxTotal": 180.00,
"DocCurrency": "EUR"
}
],
"odata.nextLink": "SalesTaxInvoices?$skip=20"
}
createSalesTaxInvoices

Creates a new sales tax invoice in the SalesTaxInvoices collection and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadSalesTaxInvoiceYesThe sales tax invoice to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: SalesTaxInvoice|error

Sample code:

SalesTaxInvoice created = check client->createSalesTaxInvoices(payload);

Sample response:

{
"DocEntry": 8,
"DocNum": 8,
"DocDate": "2026-03-11",
"CardCode": "C30000",
"DocumentTotal": 590.00,
"TaxTotal": 90.00,
"DocCurrency": "EUR"
}
getSalesTaxInvoices

Retrieves a single sales tax invoice by its DocEntry key, with optional $select and $expand query options.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetSalesTaxInvoicesQueriesNoOData query options such as $select and $expand

Returns: SalesTaxInvoice|error

Sample code:

SalesTaxInvoice invoice = check client->getSalesTaxInvoices(7);

Sample response:

{
"DocEntry": 7,
"DocNum": 7,
"DocDate": "2026-03-10",
"CardCode": "C20000",
"CustomerOrVendorName": "Maxi-Teq",
"DocumentTotal": 1180.00,
"TaxTotal": 180.00,
"DocCurrency": "EUR",
"Comments": "Tax invoice for delivery 55"
}
deleteSalesTaxInvoices

Deletes the sales tax invoice identified by the given DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteSalesTaxInvoices(7);
updateSalesTaxInvoices

Partially updates a sales tax invoice (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadSalesTaxInvoiceYesThe fields of the sales tax invoice to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateSalesTaxInvoices(7, {Comments: "Updated remarks"});

SalesPersons

listSalesPersons

Queries the SalesPersons collection and returns a page of sales persons, with optional OData query options for filtering, paging, sorting, and field selection.

Parameters:

NameTypeRequiredDescription
headersListSalesPersonsHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100
queriesListSalesPersonsQueriesNoOData query options such as $filter, $top, $skip, $orderby, $select, $expand, and $inlinecount

Returns: SalesPersonsCollectionResponse|error

Sample code:

SalesPersonsCollectionResponse response = check client->listSalesPersons();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#SalesPersons",
"value": [
{
"SalesEmployeeCode": 1,
"SalesEmployeeName": "Sophie Klogg",
"CommissionForSalesEmployee": 5.0,
"CommissionGroup": 0,
"Locked": "tNO",
"Active": "tYES",
"Email": "[email protected]"
}
],
"odata.nextLink": "SalesPersons?$skip=20"
}
createSalesPersons

Creates a new sales person in the SalesPersons collection and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadSalesPersonYesThe sales person to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: SalesPerson|error

Sample code:

SalesPerson created = check client->createSalesPersons(payload);

Sample response:

{
"SalesEmployeeCode": 2,
"SalesEmployeeName": "Bill Levine",
"CommissionForSalesEmployee": 3.5,
"CommissionGroup": 0,
"Locked": "tNO",
"Active": "tYES",
"Email": "[email protected]"
}
getSalesPersons

Retrieves a single sales person by its SalesEmployeeCode key, with optional $select and $expand query options.

Parameters:

NameTypeRequiredDescription
salesEmployeeCodeint:Signed32YesKey property 'SalesEmployeeCode' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetSalesPersonsQueriesNoOData query options such as $select and $expand

Returns: SalesPerson|error

Sample code:

SalesPerson salesPerson = check client->getSalesPersons(1);

Sample response:

{
"SalesEmployeeCode": 1,
"SalesEmployeeName": "Sophie Klogg",
"Remarks": "Senior sales representative",
"CommissionForSalesEmployee": 5.0,
"CommissionGroup": 0,
"Locked": "tNO",
"Active": "tYES",
"Telephone": "555-0100",
"Email": "[email protected]"
}
deleteSalesPersons

Deletes the sales person identified by the given SalesEmployeeCode key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
salesEmployeeCodeint:Signed32YesKey property 'SalesEmployeeCode' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteSalesPersons(1);
updateSalesPersons

Partially updates a sales person (PATCH/MERGE semantics) identified by its SalesEmployeeCode key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
salesEmployeeCodeint:Signed32YesKey property 'SalesEmployeeCode' (Edm.Int32)
payloadSalesPersonYesThe fields of the sales person to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateSalesPersons(1, {CommissionForSalesEmployee: 6.0});

CreditNotes

listCreditNotes

Queries the CreditNotes collection and returns a paged set of Document entities representing AR credit notes.

Parameters:

NameTypeRequiredDescription
headersListCreditNotesHeadersNoHeaders to be sent with the request, including the Prefer header for server-side paging control
queriesListCreditNotesQueriesNoOData query options ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select)

Returns: CreditNotesCollectionResponse|error

Sample code:

CreditNotesCollectionResponse result = check client->listCreditNotes();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#CreditNotes",
"value": [
{
"DocEntry": 210,
"DocNum": 210,
"CardCode": "C20000",
"CardName": "Example Customer",
"DocDate": "2026-07-01",
"DocTotal": 450.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
],
"odata.nextLink": "CreditNotes?$skip=20"
}
createCreditNotes

Creates a new AR credit note (Document entity) in the CreditNotes collection.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesRequest payload describing the credit note to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createCreditNotes(payload);

Sample response:

{
"DocEntry": 211,
"DocNum": 211,
"CardCode": "C20000",
"CardName": "Example Customer",
"DocDate": "2026-07-10",
"DocTotal": 200.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
getCreditNotes

Retrieves a single CreditNotes Document by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetCreditNotesQueriesNoQueries to be sent with the request ($expand, $select)

Returns: Document|error

Sample code:

Document result = check client->getCreditNotes(210);

Sample response:

{
"DocEntry": 210,
"DocNum": 210,
"CardCode": "C20000",
"CardName": "Example Customer",
"DocDate": "2026-07-01",
"DocTotal": 450.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
deleteCreditNotes

Deletes a CreditNotes Document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteCreditNotes(210);
updateCreditNotes

Partially updates a CreditNotes Document using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesRequest payload with the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateCreditNotes(210, payload);
creditNotesCancel

Invokes the bound action 'Cancel' on a CreditNotes Document to cancel it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesCancel(210);
creditNotesClose

Invokes the bound action 'Close' on a CreditNotes Document to close it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesClose(210);
creditNotesCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a CreditNotes Document to generate its cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->creditNotesCreateCancellationDocument(210);

Sample response:

{
"DocEntry": 212,
"DocNum": 212,
"CardCode": "C20000",
"DocumentStatus": "bost_Close"
}
creditNotesReopen

Invokes the bound action 'Reopen' on a CreditNotes Document to reopen it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesReopen(210);
creditNotesServiceApproveAndAdd

Calls the CreditNotesService_ApproveAndAdd function-import to approve and add a pending credit note document.

Parameters:

NameTypeRequiredDescription
payloadCreditNotesService_ApproveAndAdd_bodyYesRequest payload wrapping the Document to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesServiceApproveAndAdd(payload);
creditNotesServiceApproveAndUpdate

Calls the CreditNotesService_ApproveAndUpdate function-import to approve and update a pending credit note document.

Parameters:

NameTypeRequiredDescription
payloadCreditNotesService_ApproveAndUpdate_bodyYesRequest payload wrapping the Document to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesServiceApproveAndUpdate(payload);
creditNotesServiceCancel2

Calls the CreditNotesService_Cancel2 function-import, an alternate cancellation operation for a credit note document.

Parameters:

NameTypeRequiredDescription
payloadCreditNotesService_Cancel2_bodyYesRequest payload wrapping the Document to cancel
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesServiceCancel2(payload);
creditNotesServiceCloseByDate

Calls the CreditNotesService_CloseByDate function-import to close credit note documents up to a specified date.

Parameters:

NameTypeRequiredDescription
payloadCreditNotesService_CloseByDate_bodyYesRequest payload wrapping DocumentCloseParams (docEntry, specifiedClosingDate, closingOption)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesServiceCloseByDate(payload);
creditNotesServiceExportEWayBill

Calls the CreditNotesService_ExportEWayBill function-import to export the e-way bill for a credit note document.

Parameters:

NameTypeRequiredDescription
payloadCreditNotesService_ExportEWayBill_bodyYesRequest payload wrapping the Document to export
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesServiceExportEWayBill(payload);
creditNotesServiceGetApprovalTemplates

Calls the CreditNotesService_GetApprovalTemplates function-import to retrieve applicable approval templates for a credit note document.

Parameters:

NameTypeRequiredDescription
payloadCreditNotesService_GetApprovalTemplates_bodyYesRequest payload wrapping the Document to check
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->creditNotesServiceGetApprovalTemplates(payload);

Sample response:

{
"DocEntry": 210,
"DocumentStatus": "bost_Open"
}
creditNotesServiceHandleApprovalRequest

Calls the CreditNotesService_HandleApprovalRequest function-import to process a pending approval request for a credit note document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesServiceHandleApprovalRequest();
creditNotesServiceInitData

Calls the CreditNotesService_InitData function-import to obtain initialization data for creating a new credit note document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->creditNotesServiceInitData();

Sample response:

{
"DocEntry": 0,
"DocType": "dDocument_Items"
}
creditNotesServiceRequestApproveCancellation

Calls the CreditNotesService_RequestApproveCancellation function-import to submit a cancellation-approval request for a credit note document.

Parameters:

NameTypeRequiredDescription
payloadCreditNotesService_RequestApproveCancellation_bodyYesRequest payload wrapping the Document requiring cancellation approval
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->creditNotesServiceRequestApproveCancellation(payload);

Orders

listOrders

Queries the Orders collection and returns a paged set of sales order Document entities.

Parameters:

NameTypeRequiredDescription
headersListOrdersHeadersNoHeaders to be sent with the request, including the Prefer header for server-side paging control
queriesListOrdersQueriesNoOData query options ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select)

Returns: OrdersCollectionResponse|error

Sample code:

OrdersCollectionResponse result = check client->listOrders();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#Orders",
"value": [
{
"DocEntry": 501,
"DocNum": 501,
"CardCode": "C10000",
"CardName": "Example Customer",
"DocDate": "2026-07-01",
"DocTotal": 1250.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
],
"odata.nextLink": "Orders?$skip=20"
}
createOrders

Creates a new sales order (Document entity) in the Orders collection.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesRequest payload describing the order to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createOrders(payload);

Sample response:

{
"DocEntry": 502,
"DocNum": 502,
"CardCode": "C10000",
"CardName": "Example Customer",
"DocDate": "2026-07-10",
"DocTotal": 980.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
getOrders

Retrieves a single Orders Document by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetOrdersQueriesNoQueries to be sent with the request ($expand, $select)

Returns: Document|error

Sample code:

Document result = check client->getOrders(501);

Sample response:

{
"DocEntry": 501,
"DocNum": 501,
"CardCode": "C10000",
"CardName": "Example Customer",
"DocDate": "2026-07-01",
"DocTotal": 1250.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
deleteOrders

Deletes an Orders Document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteOrders(501);
updateOrders

Partially updates an Orders Document using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesRequest payload with the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateOrders(501, payload);
ordersCancel

Invokes the bound action 'Cancel' on an Orders Document to cancel it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->ordersCancel(501);
ordersClose

Invokes the bound action 'Close' on an Orders Document to close it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->ordersClose(501);
ordersCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on an Orders Document to generate its cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->ordersCreateCancellationDocument(501);

Sample response:

{
"DocEntry": 503,
"DocNum": 503,
"CardCode": "C10000",
"DocumentStatus": "bost_Close"
}
ordersReopen

Invokes the bound action 'Reopen' on an Orders Document to reopen it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->ordersReopen(501);
ordersServiceApproveAndAdd

Calls the OrdersService_ApproveAndAdd function-import to approve and add a pending order document.

Parameters:

NameTypeRequiredDescription
payloadOrdersService_ApproveAndAdd_bodyYesRequest payload wrapping the Document to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->ordersServiceApproveAndAdd(payload);
ordersServiceApproveAndUpdate

Calls the OrdersService_ApproveAndUpdate function-import to approve and update a pending order document.

Parameters:

NameTypeRequiredDescription
payloadOrdersService_ApproveAndUpdate_bodyYesRequest payload wrapping the Document to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->ordersServiceApproveAndUpdate(payload);
ordersServiceCloseByDate

Calls the OrdersService_CloseByDate function-import to close order documents up to a specified date.

Parameters:

NameTypeRequiredDescription
payloadOrdersService_CloseByDate_bodyYesRequest payload wrapping DocumentCloseParams (docEntry, specifiedClosingDate, closingOption)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->ordersServiceCloseByDate(payload);
ordersServiceExportEWayBill

Calls the OrdersService_ExportEWayBill function-import to export the e-way bill for an order document.

Parameters:

NameTypeRequiredDescription
payloadOrdersService_ExportEWayBill_bodyYesRequest payload wrapping the Document to export
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->ordersServiceExportEWayBill(payload);
ordersServiceGetApprovalTemplates

Calls the OrdersService_GetApprovalTemplates function-import to retrieve applicable approval templates for an order document.

Parameters:

NameTypeRequiredDescription
payloadOrdersService_GetApprovalTemplates_bodyYesRequest payload wrapping the Document to check
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->ordersServiceGetApprovalTemplates(payload);

Sample response:

{
"DocEntry": 501,
"DocumentStatus": "bost_Open"
}
ordersServiceHandleApprovalRequest

Calls the OrdersService_HandleApprovalRequest function-import to process a pending approval request for an order document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->ordersServiceHandleApprovalRequest();
ordersServiceInitData

Calls the OrdersService_InitData function-import to obtain initialization data for creating a new order document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->ordersServiceInitData();

Sample response:

{
"DocEntry": 0,
"DocType": "dDocument_Items"
}
ordersServicePreview

Calls the OrdersService_Preview function-import to preview the computed totals/lines of an order document before saving it.

Parameters:

NameTypeRequiredDescription
payloadOrdersService_Preview_bodyYesRequest payload wrapping the Document to preview
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->ordersServicePreview(payload);

Sample response:

{
"DocEntry": 0,
"DocTotal": 1250.00,
"DocCurrency": "USD"
}

ReturnRequest

listReturnRequest

Queries the ReturnRequest collection and returns a paged set of return-request Document entities.

Parameters:

NameTypeRequiredDescription
headersListReturnRequestHeadersNoHeaders to be sent with the request, including the Prefer header for server-side paging control
queriesListReturnRequestQueriesNoOData query options ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select)

Returns: ReturnRequestCollectionResponse|error

Sample code:

ReturnRequestCollectionResponse result = check client->listReturnRequest();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#ReturnRequest",
"value": [
{
"DocEntry": 301,
"DocNum": 301,
"CardCode": "C30000",
"CardName": "Example Customer",
"DocDate": "2026-07-01",
"DocTotal": 75.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
],
"odata.nextLink": "ReturnRequest?$skip=20"
}
createReturnRequest

Creates a new return request (Document entity) in the ReturnRequest collection.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesRequest payload describing the return request to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createReturnRequest(payload);

Sample response:

{
"DocEntry": 302,
"DocNum": 302,
"CardCode": "C30000",
"CardName": "Example Customer",
"DocDate": "2026-07-10",
"DocTotal": 60.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
getReturnRequest

Retrieves a single ReturnRequest Document by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetReturnRequestQueriesNoQueries to be sent with the request ($expand, $select)

Returns: Document|error

Sample code:

Document result = check client->getReturnRequest(301);

Sample response:

{
"DocEntry": 301,
"DocNum": 301,
"CardCode": "C30000",
"CardName": "Example Customer",
"DocDate": "2026-07-01",
"DocTotal": 75.00,
"DocCurrency": "USD",
"DocumentStatus": "bost_Open"
}
deleteReturnRequest

Deletes a ReturnRequest Document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteReturnRequest(301);
updateReturnRequest

Partially updates a ReturnRequest Document using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesRequest payload with the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateReturnRequest(301, payload);
returnRequestCancel

Invokes the bound action 'Cancel' on a ReturnRequest Document to cancel it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->returnRequestCancel(301);
returnRequestClose

Invokes the bound action 'Close' on a ReturnRequest Document to close it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->returnRequestClose(301);
returnRequestCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a ReturnRequest Document to generate its cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->returnRequestCreateCancellationDocument(301);

Sample response:

{
"DocEntry": 303,
"DocNum": 303,
"CardCode": "C30000",
"DocumentStatus": "bost_Close"
}
returnRequestReopen

Invokes the bound action 'Reopen' on a ReturnRequest Document to reopen it.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->returnRequestReopen(301);
returnRequestServiceApproveAndAdd

Calls the ReturnRequestService_ApproveAndAdd function-import to approve and add a pending return request document.

Parameters:

NameTypeRequiredDescription
payloadReturnRequestService_ApproveAndAdd_bodyYesRequest payload wrapping the Document to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->returnRequestServiceApproveAndAdd(payload);
returnRequestServiceApproveAndUpdate

Calls the ReturnRequestService_ApproveAndUpdate function-import to approve and update a pending return request document.

Parameters:

NameTypeRequiredDescription
payloadReturnRequestService_ApproveAndUpdate_bodyYesRequest payload wrapping the Document to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->returnRequestServiceApproveAndUpdate(payload);
returnRequestServiceCloseByDate

Calls the ReturnRequestService_CloseByDate function-import to close return request documents up to a specified date.

Parameters:

NameTypeRequiredDescription
payloadReturnRequestService_CloseByDate_bodyYesRequest payload wrapping DocumentCloseParams (docEntry, specifiedClosingDate, closingOption)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->returnRequestServiceCloseByDate(payload);
returnRequestServiceExportEWayBill

Calls the ReturnRequestService_ExportEWayBill function-import to export the e-way bill for a return request document.

Parameters:

NameTypeRequiredDescription
payloadReturnRequestService_ExportEWayBill_bodyYesRequest payload wrapping the Document to export
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->returnRequestServiceExportEWayBill(payload);
returnRequestServiceGetApprovalTemplates

Calls the ReturnRequestService_GetApprovalTemplates function-import to retrieve applicable approval templates for a return request document.

Parameters:

NameTypeRequiredDescription
payloadReturnRequestService_GetApprovalTemplates_bodyYesRequest payload wrapping the Document to check
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->returnRequestServiceGetApprovalTemplates(payload);

Sample response:

{
"DocEntry": 301,
"DocumentStatus": "bost_Open"
}
returnRequestServiceHandleApprovalRequest

Calls the ReturnRequestService_HandleApprovalRequest function-import to process a pending approval request for a return request document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->returnRequestServiceHandleApprovalRequest();
returnRequestServiceInitData

Calls the ReturnRequestService_InitData function-import to obtain initialization data for creating a new return request document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->returnRequestServiceInitData();

Sample response:

{
"DocEntry": 0,
"DocType": "dDocument_Items"
}

POSDailySummary

listPOSDailySummary

Queries the POSDailySummary collection and returns a paged set of point-of-sale daily summary entities.

Parameters:

NameTypeRequiredDescription
headersListPOSDailySummaryHeadersNoHeaders to be sent with the request, including the Prefer header for server-side paging control
queriesListPOSDailySummaryQueriesNoOData query options ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select)

Returns: POSDailySummaryCollectionResponse|error

Sample code:

POSDailySummaryCollectionResponse result = check client->listPOSDailySummary();

Sample response:

{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#POSDailySummary",
"value": [
{
"AbsEntry": 40,
"Date": "2026-07-09",
"GrossSales": 5230.50,
"Total": 5230.50,
"CounterPosition": 12,
"Invoices": []
}
],
"odata.nextLink": "POSDailySummary?$skip=20"
}
createPOSDailySummary

Creates a new POSDailySummary entity summarizing point-of-sale activity for a given date.

Parameters:

NameTypeRequiredDescription
payloadPOSDailySummaryYesRequest payload describing the POS daily summary to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: POSDailySummary|error

Sample code:

POSDailySummary result = check client->createPOSDailySummary(payload);

Sample response:

{
"AbsEntry": 41,
"Date": "2026-07-10",
"GrossSales": 3120.00,
"Total": 3120.00,
"CounterPosition": 13,
"Invoices": []
}
getPOSDailySummary

Retrieves a single POSDailySummary entity by its AbsEntry key.

Parameters:

NameTypeRequiredDescription
absEntryint:Signed32YesKey property 'AbsEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetPOSDailySummaryQueriesNoQueries to be sent with the request ($expand, $select)

Returns: POSDailySummary|error

Sample code:

POSDailySummary result = check client->getPOSDailySummary(40);

Sample response:

{
"AbsEntry": 40,
"Date": "2026-07-09",
"GrossSales": 5230.50,
"Total": 5230.50,
"CounterPosition": 12,
"Invoices": []
}
deletePOSDailySummary

Deletes a POSDailySummary entity identified by its AbsEntry key.

Parameters:

NameTypeRequiredDescription
absEntryint:Signed32YesKey property 'AbsEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deletePOSDailySummary(40);
updatePOSDailySummary

Partially updates a POSDailySummary entity using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
absEntryint:Signed32YesKey property 'AbsEntry' (Edm.Int32)
payloadPOSDailySummaryYesRequest payload with the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updatePOSDailySummary(40, payload);

Invoices

listInvoices

Queries the Invoices collection and returns a paged list of A/R Invoice documents from the SAP Business One Service Layer.

Parameters:

NameTypeRequiredDescription
headersListInvoicesHeadersNoHeaders to be sent with the request (e.g. Prefer for odata.maxpagesize)
queriesListInvoicesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: InvoicesCollectionResponse|error

Sample code:

InvoicesCollectionResponse result = check client->listInvoices();

Sample response:

{
"odata.metadata": "$metadata#Invoices",
"value": [
{
"DocEntry": 1801,
"DocNum": 90045,
"CardCode": "C20000",
"CardName": "Global Retail Ltd",
"DocDate": "2026-07-10",
"DocDueDate": "2026-08-09",
"DocTotal": 4520.00,
"DocumentLines": [
{
"LineNum": 0,
"ItemCode": "A0001",
"ItemDescription": "Desk Lamp",
"Quantity": 10,
"Price": 45.20
}
]
}
],
"odata.nextLink": "Invoices?$skip=20"
}
createInvoices

Creates a new A/R Invoice document in SAP Business One.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesRequest payload describing the invoice document to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createInvoices(payload);

Sample response:

{
"DocEntry": 1802,
"DocNum": 90046,
"CardCode": "C20000",
"CardName": "Global Retail Ltd",
"DocDate": "2026-07-14",
"DocTotal": 1200.00
}
getInvoices

Retrieves a single Invoice document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetInvoicesQueriesNoOData query options: $expand, $select

Returns: Document|error

Sample code:

Document result = check client->getInvoices(1801);

Sample response:

{
"DocEntry": 1801,
"DocNum": 90045,
"CardCode": "C20000",
"CardName": "Global Retail Ltd",
"DocDate": "2026-07-10",
"DocTotal": 4520.00
}
deleteInvoices

Deletes an Invoice document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->deleteInvoices(1801);
updateInvoices

Partially updates an Invoice document using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesRequest payload containing the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->updateInvoices(1801, payload);
invoicesCancel

Invokes the bound action 'Cancel' on an Invoices document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesCancel(1801);
invoicesClose

Invokes the bound action 'Close' on an Invoices document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesClose(1801);
invoicesCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on an Invoices document (binding type Document), returning the generated cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->invoicesCreateCancellationDocument(1801);

Sample response:

{
"DocEntry": 1900,
"DocNum": 90099,
"CardCode": "C20000",
"DocTotal": -4520.00
}
invoicesReopen

Invokes the bound action 'Reopen' on an Invoices document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesReopen(1801);
invoicesServiceApproveAndAdd

Calls the InvoicesService_ApproveAndAdd function import to approve and add an invoice document.

Parameters:

NameTypeRequiredDescription
payloadInvoicesService_ApproveAndAdd_bodyYesRequest payload containing the document (Document) to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesServiceApproveAndAdd(payload);
invoicesServiceApproveAndUpdate

Calls the InvoicesService_ApproveAndUpdate function import to approve and update an invoice document.

Parameters:

NameTypeRequiredDescription
payloadInvoicesService_ApproveAndUpdate_bodyYesRequest payload containing the document (Document) to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesServiceApproveAndUpdate(payload);
invoicesServiceCancel2

Calls the InvoicesService_Cancel2 function import (alternate cancellation flow) on an invoice document.

Parameters:

NameTypeRequiredDescription
payloadInvoicesService_Cancel2_bodyYesRequest payload containing the document (Document) to cancel
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesServiceCancel2(payload);
invoicesServiceCloseByDate

Calls the InvoicesService_CloseByDate function import to close an invoice as of a specified date.

Parameters:

NameTypeRequiredDescription
payloadInvoicesService_CloseByDate_bodyYesRequest payload containing documentCloseParams (DocumentCloseParams: docEntry, specifiedClosingDate, closingOption)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesServiceCloseByDate(payload);
invoicesServiceExportEWayBill

Calls the InvoicesService_ExportEWayBill function import to export an e-way bill for an invoice document.

Parameters:

NameTypeRequiredDescription
payloadInvoicesService_ExportEWayBill_bodyYesRequest payload containing the document (Document) to export
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesServiceExportEWayBill(payload);
invoicesServiceGetApprovalTemplates

Calls the InvoicesService_GetApprovalTemplates function import to retrieve applicable approval templates for an invoice document.

Parameters:

NameTypeRequiredDescription
payloadInvoicesService_GetApprovalTemplates_bodyYesRequest payload containing the document (Document) to evaluate
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->invoicesServiceGetApprovalTemplates(payload);

Sample response:

{
"DocEntry": 1801,
"DocNum": 90045,
"CardCode": "C20000"
}
invoicesServiceHandleApprovalRequest

Calls the InvoicesService_HandleApprovalRequest function import to handle a pending approval request for an invoice document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesServiceHandleApprovalRequest();
invoicesServiceInitData

Calls the InvoicesService_InitData function import to retrieve initialization data for creating a new invoice document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->invoicesServiceInitData();

Sample response:

{
"DocEntry": 0,
"DocType": "dDocument_Items"
}
invoicesServiceRequestApproveCancellation

Calls the InvoicesService_RequestApproveCancellation function import to request approval for cancelling an invoice document.

Parameters:

NameTypeRequiredDescription
payloadInvoicesService_RequestApproveCancellation_bodyYesRequest payload containing the document (Document) whose cancellation approval is requested
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->invoicesServiceRequestApproveCancellation(payload);

Returns

listReturns

Queries the Returns collection and returns a paged list of Sales Return documents.

Parameters:

NameTypeRequiredDescription
headersListReturnsHeadersNoHeaders to be sent with the request (e.g. Prefer for odata.maxpagesize)
queriesListReturnsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: ReturnsCollectionResponse|error

Sample code:

ReturnsCollectionResponse result = check client->listReturns();

Sample response:

{
"odata.metadata": "$metadata#Returns",
"value": [
{
"DocEntry": 2301,
"DocNum": 40012,
"CardCode": "C20000",
"CardName": "Global Retail Ltd",
"DocDate": "2026-07-05",
"DocTotal": 220.00
}
],
"odata.nextLink": "Returns?$skip=20"
}
createReturns

Creates a new Sales Return document in SAP Business One.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesRequest payload describing the return document to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createReturns(payload);

Sample response:

{
"DocEntry": 2302,
"DocNum": 40013,
"CardCode": "C20000",
"DocTotal": 95.00
}
getReturns

Retrieves a single Return document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetReturnsQueriesNoOData query options: $expand, $select

Returns: Document|error

Sample code:

Document result = check client->getReturns(2301);

Sample response:

{
"DocEntry": 2301,
"DocNum": 40012,
"CardCode": "C20000",
"DocTotal": 220.00
}
deleteReturns

Deletes a Return document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->deleteReturns(2301);
updateReturns

Partially updates a Return document using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesRequest payload containing the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->updateReturns(2301, payload);
returnsCancel

Invokes the bound action 'Cancel' on a Returns document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsCancel(2301);
returnsClose

Invokes the bound action 'Close' on a Returns document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsClose(2301);
returnsCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a Returns document (binding type Document), returning the generated cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->returnsCreateCancellationDocument(2301);

Sample response:

{
"DocEntry": 2400,
"DocNum": 40099,
"CardCode": "C20000",
"DocTotal": -220.00
}
returnsReopen

Invokes the bound action 'Reopen' on a Returns document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsReopen(2301);
returnsServiceApproveAndAdd

Calls the ReturnsService_ApproveAndAdd function import to approve and add a return document.

Parameters:

NameTypeRequiredDescription
payloadReturnsService_ApproveAndAdd_bodyYesRequest payload containing the document (Document) to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsServiceApproveAndAdd(payload);
returnsServiceApproveAndUpdate

Calls the ReturnsService_ApproveAndUpdate function import to approve and update a return document.

Parameters:

NameTypeRequiredDescription
payloadReturnsService_ApproveAndUpdate_bodyYesRequest payload containing the document (Document) to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsServiceApproveAndUpdate(payload);
returnsServiceCancel2

Calls the ReturnsService_Cancel2 function import (alternate cancellation flow) on a return document.

Parameters:

NameTypeRequiredDescription
payloadReturnsService_Cancel2_bodyYesRequest payload containing the document (Document) to cancel
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsServiceCancel2(payload);
returnsServiceCloseByDate

Calls the ReturnsService_CloseByDate function import to close a return document as of a specified date.

Parameters:

NameTypeRequiredDescription
payloadReturnsService_CloseByDate_bodyYesRequest payload containing documentCloseParams (DocumentCloseParams: docEntry, specifiedClosingDate, closingOption)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsServiceCloseByDate(payload);
returnsServiceExportEWayBill

Calls the ReturnsService_ExportEWayBill function import to export an e-way bill for a return document.

Parameters:

NameTypeRequiredDescription
payloadReturnsService_ExportEWayBill_bodyYesRequest payload containing the document (Document) to export
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsServiceExportEWayBill(payload);
returnsServiceGetApprovalTemplates

Calls the ReturnsService_GetApprovalTemplates function import to retrieve applicable approval templates for a return document.

Parameters:

NameTypeRequiredDescription
payloadReturnsService_GetApprovalTemplates_bodyYesRequest payload containing the document (Document) to evaluate
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->returnsServiceGetApprovalTemplates(payload);

Sample response:

{
"DocEntry": 2301,
"DocNum": 40012,
"CardCode": "C20000"
}
returnsServiceHandleApprovalRequest

Calls the ReturnsService_HandleApprovalRequest function import to handle a pending approval request for a return document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->returnsServiceHandleApprovalRequest();
returnsServiceInitData

Calls the ReturnsService_InitData function import to retrieve initialization data for creating a new return document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->returnsServiceInitData();

Sample response:

{
"DocEntry": 0,
"DocType": "dDocument_Items"
}

CorrectionInvoice

listCorrectionInvoice

Queries the CorrectionInvoice collection and returns a paged list of Correction Invoice documents.

Parameters:

NameTypeRequiredDescription
headersListCorrectionInvoiceHeadersNoHeaders to be sent with the request (e.g. Prefer for odata.maxpagesize)
queriesListCorrectionInvoiceQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: CorrectionInvoiceCollectionResponse|error

Sample code:

CorrectionInvoiceCollectionResponse result = check client->listCorrectionInvoice();

Sample response:

{
"odata.metadata": "$metadata#CorrectionInvoice",
"value": [
{
"DocEntry": 601,
"DocNum": 15003,
"CardCode": "C20000",
"CardName": "Global Retail Ltd",
"DocDate": "2026-07-08",
"DocTotal": -150.00
}
],
"odata.nextLink": "CorrectionInvoice?$skip=20"
}
createCorrectionInvoice

Creates a new Correction Invoice document in SAP Business One.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesRequest payload describing the correction invoice document to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createCorrectionInvoice(payload);

Sample response:

{
"DocEntry": 602,
"DocNum": 15004,
"CardCode": "C20000",
"DocTotal": -75.00
}
getCorrectionInvoice

Retrieves a single Correction Invoice document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetCorrectionInvoiceQueriesNoOData query options: $expand, $select

Returns: Document|error

Sample code:

Document result = check client->getCorrectionInvoice(601);

Sample response:

{
"DocEntry": 601,
"DocNum": 15003,
"CardCode": "C20000",
"DocTotal": -150.00
}
deleteCorrectionInvoice

Deletes a Correction Invoice document identified by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->deleteCorrectionInvoice(601);
updateCorrectionInvoice

Partially updates a Correction Invoice document using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesRequest payload containing the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->updateCorrectionInvoice(601, payload);
correctionInvoiceCancel

Invokes the bound action 'Cancel' on a CorrectionInvoice document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->correctionInvoiceCancel(601);
correctionInvoiceClose

Invokes the bound action 'Close' on a CorrectionInvoice document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->correctionInvoiceClose(601);
correctionInvoiceCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a CorrectionInvoice document (binding type Document), returning the generated cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->correctionInvoiceCreateCancellationDocument(601);

Sample response:

{
"DocEntry": 650,
"DocNum": 15050,
"CardCode": "C20000",
"DocTotal": 150.00
}
correctionInvoiceReopen

Invokes the bound action 'Reopen' on a CorrectionInvoice document (binding type Document).

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->correctionInvoiceReopen(601);
correctionInvoiceServiceApproveAndAdd

Calls the CorrectionInvoiceService_ApproveAndAdd function import to approve and add a correction invoice document.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceService_ApproveAndAdd_bodyYesRequest payload containing the document (Document) to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->correctionInvoiceServiceApproveAndAdd(payload);
correctionInvoiceServiceApproveAndUpdate

Calls the CorrectionInvoiceService_ApproveAndUpdate function import to approve and update a correction invoice document.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceService_ApproveAndUpdate_bodyYesRequest payload containing the document (Document) to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->correctionInvoiceServiceApproveAndUpdate(payload);
correctionInvoiceServiceCloseByDate

Calls the CorrectionInvoiceService_CloseByDate function import to close a correction invoice document as of a specified date.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceService_CloseByDate_bodyYesRequest payload containing documentCloseParams (DocumentCloseParams: docEntry, specifiedClosingDate, closingOption)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->correctionInvoiceServiceCloseByDate(payload);
correctionInvoiceServiceExportEWayBill

Calls the CorrectionInvoiceService_ExportEWayBill function import to export an e-way bill for a correction invoice document.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceService_ExportEWayBill_bodyYesRequest payload containing the document (Document) to export
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->correctionInvoiceServiceExportEWayBill(payload);
correctionInvoiceServiceGetApprovalTemplates

Calls the CorrectionInvoiceService_GetApprovalTemplates function import to retrieve applicable approval templates for a correction invoice document.

Parameters:

NameTypeRequiredDescription
payloadCorrectionInvoiceService_GetApprovalTemplates_bodyYesRequest payload containing the document (Document) to evaluate
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->correctionInvoiceServiceGetApprovalTemplates(payload);

Sample response:

{
"DocEntry": 601,
"DocNum": 15003,
"CardCode": "C20000"
}
correctionInvoiceServiceHandleApprovalRequest

Calls the CorrectionInvoiceService_HandleApprovalRequest function import to handle a pending approval request for a correction invoice document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->correctionInvoiceServiceHandleApprovalRequest();
correctionInvoiceServiceInitData

Calls the CorrectionInvoiceService_InitData function import to retrieve initialization data for creating a new correction invoice document.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->correctionInvoiceServiceInitData();

Sample response:

{
"DocEntry": 0,
"DocType": "dDocument_Items"
}

DunningTerms

listDunningTerms

Queries the DunningTerms collection and returns a paged list of dunning term configuration entities.

Parameters:

NameTypeRequiredDescription
headersListDunningTermsHeadersNoHeaders to be sent with the request (e.g. Prefer for odata.maxpagesize)
queriesListDunningTermsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: DunningTermsCollectionResponse|error

Sample code:

DunningTermsCollectionResponse result = check client->listDunningTerms();

Sample response:

{
"odata.metadata": "$metadata#DunningTerms",
"value": [
{
"Code": "D1",
"Name": "Standard Dunning",
"DaysInMonth": 30,
"DaysInYear": 365,
"LetterFee": 10.00,
"LetterFeeCurrency": "USD",
"DunningTermLines": [
{
"LevelNum": 1,
"LetterFee": 5.00,
"MininumBalance": 50.00,
"Effectiveafter": 7
}
]
}
],
"odata.nextLink": "DunningTerms?$skip=20"
}
createDunningTerms

Creates a new DunningTerm configuration entity.

Parameters:

NameTypeRequiredDescription
payloadDunningTermYesRequest payload describing the dunning term to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: DunningTerm|error

Sample code:

DunningTerm result = check client->createDunningTerms(payload);

Sample response:

{
"Code": "D2",
"Name": "Aggressive Dunning",
"DaysInMonth": 30,
"DaysInYear": 365,
"LetterFee": 15.00
}
getDunningTerms

Retrieves a single DunningTerm entity identified by its Code key.

Parameters:

NameTypeRequiredDescription
codestringYesKey property 'Code' (Edm.String)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetDunningTermsQueriesNoOData query options: $expand, $select

Returns: DunningTerm|error

Sample code:

DunningTerm result = check client->getDunningTerms("D1");

Sample response:

{
"Code": "D1",
"Name": "Standard Dunning",
"DaysInMonth": 30,
"DaysInYear": 365,
"LetterFee": 10.00
}
deleteDunningTerms

Deletes a DunningTerm entity identified by its Code key.

Parameters:

NameTypeRequiredDescription
codestringYesKey property 'Code' (Edm.String)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->deleteDunningTerms("D1");
updateDunningTerms

Partially updates a DunningTerm entity using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
codestringYesKey property 'Code' (Edm.String)
payloadDunningTermYesRequest payload containing the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->updateDunningTerms("D1", payload);
dunningTermsServiceGetDunningTermList

Calls the DunningTermsService_GetDunningTermList function import to retrieve a lightweight list of dunning term codes and names.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: inline_response_200_2|error

Sample code:

inline_response_200_2 result = check client->dunningTermsServiceGetDunningTermList();

Sample response:

{
"odata.metadata": "$metadata#DunningTermsService_GetDunningTermList",
"value": [
{
"Code": "D1",
"Name": "Standard Dunning"
},
{
"Code": "D2",
"Name": "Aggressive Dunning"
}
]
}

CommissionGroups

listCommissionGroups

Queries the CommissionGroups collection and returns a paged list of commission group entities.

Parameters:

NameTypeRequiredDescription
headersListCommissionGroupsHeadersNoHeaders to be sent with the request (e.g. Prefer for odata.maxpagesize)
queriesListCommissionGroupsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: CommissionGroupsCollectionResponse|error

Sample code:

CommissionGroupsCollectionResponse result = check client->listCommissionGroups();

Sample response:

{
"odata.metadata": "$metadata#CommissionGroups",
"value": [
{
"CommissionGroupCode": 1,
"CommissionGroupName": "North Region",
"CommissionPercentage": 5.5,
"SalesPersons": [
{
"SalesEmployeeCode": 12,
"SalesEmployeeName": "Jane Doe",
"CommissionForSalesEmployee": 5.5
}
]
}
],
"odata.nextLink": "CommissionGroups?$skip=20"
}
createCommissionGroups

Creates a new CommissionGroup entity.

Parameters:

NameTypeRequiredDescription
payloadCommissionGroupYesRequest payload describing the commission group to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: CommissionGroup|error

Sample code:

CommissionGroup result = check client->createCommissionGroups(payload);

Sample response:

{
"CommissionGroupCode": 2,
"CommissionGroupName": "South Region",
"CommissionPercentage": 4.0
}
getCommissionGroups

Retrieves a single CommissionGroup entity identified by its CommissionGroupCode key.

Parameters:

NameTypeRequiredDescription
commissionGroupCodeint:Signed32YesKey property 'CommissionGroupCode' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetCommissionGroupsQueriesNoOData query options: $expand, $select

Returns: CommissionGroup|error

Sample code:

CommissionGroup result = check client->getCommissionGroups(1);

Sample response:

{
"CommissionGroupCode": 1,
"CommissionGroupName": "North Region",
"CommissionPercentage": 5.5
}
deleteCommissionGroups

Deletes a CommissionGroup entity identified by its CommissionGroupCode key.

Parameters:

NameTypeRequiredDescription
commissionGroupCodeint:Signed32YesKey property 'CommissionGroupCode' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->deleteCommissionGroups(1);
updateCommissionGroups

Partially updates a CommissionGroup entity using PATCH/MERGE semantics.

Parameters:

NameTypeRequiredDescription
commissionGroupCodeint:Signed32YesKey property 'CommissionGroupCode' (Edm.Int32)
payloadCommissionGroupYesRequest payload containing the fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

_ = check client->updateCommissionGroups(1, payload);

DeliveryNotes

listDeliveryNotes

Queries the DeliveryNotes collection and returns a page of delivery note documents, with OData query options for filtering, sorting, paging, and field selection.

Parameters:

NameTypeRequiredDescription
headersListDeliveryNotesHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100 for paging control
queriesListDeliveryNotesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: DeliveryNotesCollectionResponse|error

Sample code:

DeliveryNotesCollectionResponse result = check client->listDeliveryNotes();

Sample response:

{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#DeliveryNotes",
"value": [
{
"DocEntry": 15,
"DocNum": 15,
"CardCode": "C20000",
"CardName": "Maxi-Teq",
"DocDate": "2026-07-01",
"DocTotal": 1270.5
}
],
"odata.nextLink": "DeliveryNotes?$skip=20"
}
createDeliveryNotes

Creates a new delivery note document and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesThe delivery note document to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createDeliveryNotes({CardCode: "C20000", DocDate: "2026-07-01"});

Sample response:

{
"DocEntry": 16,
"DocNum": 16,
"CardCode": "C20000",
"CardName": "Maxi-Teq",
"DocDate": "2026-07-01",
"DocTotal": 1270.5
}
getDeliveryNotes

Gets a single delivery note document by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetDeliveryNotesQueriesNoOData query options: $expand, $select

Returns: Document|error

Sample code:

Document result = check client->getDeliveryNotes(15);

Sample response:

{
"DocEntry": 15,
"DocNum": 15,
"CardCode": "C20000",
"CardName": "Maxi-Teq",
"DocDate": "2026-07-01",
"DocTotal": 1270.5
}
deleteDeliveryNotes

Deletes a delivery note document identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteDeliveryNotes(15);
updateDeliveryNotes

Partially updates a delivery note document (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesThe document fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateDeliveryNotes(15, {Comments: "Updated delivery note"});
deliveryNotesCancel

Invokes the bound action 'Cancel' on a delivery note document to cancel it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesCancel(15);
deliveryNotesClose

Invokes the bound action 'Close' on a delivery note document to close it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesClose(15);
deliveryNotesCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a delivery note to create and return its cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->deliveryNotesCreateCancellationDocument(15);

Sample response:

{
"DocEntry": 17,
"DocNum": 17,
"CardCode": "C20000",
"DocDate": "2026-07-02",
"Comments": "Cancellation document for delivery note 15"
}
deliveryNotesReopen

Invokes the bound action 'Reopen' on a delivery note document to reopen it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesReopen(15);
deliveryNotesServiceApproveAndAdd

Approves and adds a delivery note document via the DeliveryNotesService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDeliveryNotesService_ApproveAndAdd_bodyYesRequest payload wrapping the Document to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesServiceApproveAndAdd({document: {CardCode: "C20000", DocDate: "2026-07-01"}});
deliveryNotesServiceApproveAndUpdate

Approves and updates a delivery note document via the DeliveryNotesService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDeliveryNotesService_ApproveAndUpdate_bodyYesRequest payload wrapping the Document to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesServiceApproveAndUpdate({document: {DocEntry: 15, Comments: "Approved"}});
deliveryNotesServiceCancel2

Cancels a delivery note document via the DeliveryNotesService 'Cancel2' operation; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDeliveryNotesService_Cancel2_bodyYesRequest payload wrapping the Document to cancel
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesServiceCancel2({document: {DocEntry: 15}});
deliveryNotesServiceCloseByDate

Closes delivery note documents by date via the DeliveryNotesService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDeliveryNotesService_CloseByDate_bodyYesRequest payload wrapping the DocumentCloseParams close criteria
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesServiceCloseByDate({documentCloseParams: {}});
deliveryNotesServiceExportEWayBill

Exports the E-Way bill for a delivery note document via the DeliveryNotesService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDeliveryNotesService_ExportEWayBill_bodyYesRequest payload wrapping the Document whose E-Way bill is exported
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesServiceExportEWayBill({document: {DocEntry: 15}});
deliveryNotesServiceGetApprovalTemplates

Gets the approval templates applicable to a delivery note document via the DeliveryNotesService.

Parameters:

NameTypeRequiredDescription
payloadDeliveryNotesService_GetApprovalTemplates_bodyYesRequest payload wrapping the Document to evaluate
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->deliveryNotesServiceGetApprovalTemplates({document: {CardCode: "C20000"}});

Sample response:

{
"DocEntry": 15,
"DocNum": 15,
"CardCode": "C20000",
"DocDate": "2026-07-01"
}
deliveryNotesServiceHandleApprovalRequest

Handles a pending approval request for delivery notes via the DeliveryNotesService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deliveryNotesServiceHandleApprovalRequest();
deliveryNotesServiceInitData

Initializes and returns a delivery note document with default data via the DeliveryNotesService.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->deliveryNotesServiceInitData();

Sample response:

{
"DocDate": "2026-07-14",
"DocDueDate": "2026-07-14",
"DocCurrency": "USD",
"Series": 4
}

Drafts

listDrafts

Queries the Drafts collection and returns a page of draft documents, with OData query options for filtering, sorting, paging, and field selection.

Parameters:

NameTypeRequiredDescription
headersListDraftsHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100 for paging control
queriesListDraftsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: DraftsCollectionResponse|error

Sample code:

DraftsCollectionResponse result = check client->listDrafts();

Sample response:

{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#Drafts",
"value": [
{
"DocEntry": 42,
"DocNum": 42,
"CardCode": "C30000",
"CardName": "Microchips",
"DocDate": "2026-07-05",
"DocTotal": 980.0
}
],
"odata.nextLink": "Drafts?$skip=20"
}
createDrafts

Creates a new draft document and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesThe draft document to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createDrafts({CardCode: "C30000", DocDate: "2026-07-05"});

Sample response:

{
"DocEntry": 43,
"DocNum": 43,
"CardCode": "C30000",
"CardName": "Microchips",
"DocDate": "2026-07-05",
"DocTotal": 980.0
}
getDrafts

Gets a single draft document by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetDraftsQueriesNoOData query options: $expand, $select

Returns: Document|error

Sample code:

Document result = check client->getDrafts(42);

Sample response:

{
"DocEntry": 42,
"DocNum": 42,
"CardCode": "C30000",
"CardName": "Microchips",
"DocDate": "2026-07-05",
"DocTotal": 980.0
}
deleteDrafts

Deletes a draft document identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteDrafts(42);
updateDrafts

Partially updates a draft document (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesThe document fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateDrafts(42, {Comments: "Updated draft"});
draftsCancel

Invokes the bound action 'Cancel' on a draft document to cancel it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsCancel(42);
draftsClose

Invokes the bound action 'Close' on a draft document to close it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsClose(42);
draftsCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a draft to create and return its cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->draftsCreateCancellationDocument(42);

Sample response:

{
"DocEntry": 44,
"DocNum": 44,
"CardCode": "C30000",
"DocDate": "2026-07-06",
"Comments": "Cancellation document for draft 42"
}
draftsReopen

Invokes the bound action 'Reopen' on a draft document to reopen it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsReopen(42);
draftsServiceApproveAndAdd

Approves and adds a draft document via the DraftsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDraftsService_ApproveAndAdd_bodyYesRequest payload wrapping the Document to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsServiceApproveAndAdd({document: {CardCode: "C30000", DocDate: "2026-07-05"}});
draftsServiceApproveAndUpdate

Approves and updates a draft document via the DraftsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDraftsService_ApproveAndUpdate_bodyYesRequest payload wrapping the Document to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsServiceApproveAndUpdate({document: {DocEntry: 42, Comments: "Approved"}});
draftsServiceCloseByDate

Closes draft documents by date via the DraftsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDraftsService_CloseByDate_bodyYesRequest payload wrapping the DocumentCloseParams close criteria
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsServiceCloseByDate({documentCloseParams: {}});
draftsServiceExportEWayBill

Exports the E-Way bill for a draft document via the DraftsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDraftsService_ExportEWayBill_bodyYesRequest payload wrapping the Document whose E-Way bill is exported
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsServiceExportEWayBill({document: {DocEntry: 42}});
draftsServiceGetApprovalTemplates

Gets the approval templates applicable to a draft document via the DraftsService.

Parameters:

NameTypeRequiredDescription
payloadDraftsService_GetApprovalTemplates_bodyYesRequest payload wrapping the Document to evaluate
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->draftsServiceGetApprovalTemplates({document: {CardCode: "C30000"}});

Sample response:

{
"DocEntry": 42,
"DocNum": 42,
"CardCode": "C30000",
"DocDate": "2026-07-05"
}
draftsServiceHandleApprovalRequest

Handles a pending approval request for drafts via the DraftsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsServiceHandleApprovalRequest();
draftsServiceInitData

Initializes and returns a draft document with default data via the DraftsService.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->draftsServiceInitData();

Sample response:

{
"DocDate": "2026-07-14",
"DocDueDate": "2026-07-14",
"DocCurrency": "USD",
"Series": 9
}
draftsServiceSaveDraftToDocument

Saves a draft as a regular document via the DraftsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadDraftsService_SaveDraftToDocument_bodyYesRequest payload wrapping the draft Document to convert
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->draftsServiceSaveDraftToDocument({document: {DocEntry: 42}});

DunningLetters

listDunningLetters

Queries the DunningLetters collection and returns a page of dunning letters, with OData query options for filtering, sorting, paging, and field selection.

Parameters:

NameTypeRequiredDescription
headersListDunningLettersHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100 for paging control
queriesListDunningLettersQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: DunningLettersCollectionResponse|error

Sample code:

DunningLettersCollectionResponse result = check client->listDunningLetters();

Sample response:

{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#DunningLetters",
"value": [
{
"RowNumber": 1,
"LetterFormat": "DunningLetter01",
"Effectiveafter": "2026-01-01",
"Feeperletter": 5.0,
"FeeCurrency": "USD",
"MinimumBalance": 100.0,
"MinimumBalanceCurrency": "USD",
"CalcInterest": "tYES"
}
],
"odata.nextLink": "DunningLetters?$skip=20"
}
createDunningLetters

Creates a new dunning letter and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadDunningLetterYesThe dunning letter to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: DunningLetter|error

Sample code:

DunningLetter result = check client->createDunningLetters({LetterFormat: "DunningLetter01", Feeperletter: 5.0});

Sample response:

{
"RowNumber": 2,
"LetterFormat": "DunningLetter01",
"Feeperletter": 5.0,
"FeeCurrency": "USD",
"MinimumBalance": 100.0,
"MinimumBalanceCurrency": "USD",
"CalcInterest": "tYES"
}
getDunningLetters

Gets a single dunning letter by its RowNumber key.

Parameters:

NameTypeRequiredDescription
rowNumberint:Signed32YesKey property 'RowNumber' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetDunningLettersQueriesNoOData query options: $expand, $select

Returns: DunningLetter|error

Sample code:

DunningLetter result = check client->getDunningLetters(1);

Sample response:

{
"RowNumber": 1,
"LetterFormat": "DunningLetter01",
"Effectiveafter": "2026-01-01",
"Feeperletter": 5.0,
"FeeCurrency": "USD",
"MinimumBalance": 100.0,
"MinimumBalanceCurrency": "USD",
"CalcInterest": "tYES"
}
deleteDunningLetters

Deletes a dunning letter identified by its RowNumber key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
rowNumberint:Signed32YesKey property 'RowNumber' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteDunningLetters(1);
updateDunningLetters

Partially updates a dunning letter (PATCH/MERGE semantics) identified by its RowNumber key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
rowNumberint:Signed32YesKey property 'RowNumber' (Edm.Int32)
payloadDunningLetterYesThe dunning letter fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateDunningLetters(1, {Feeperletter: 7.5});

Quotations

listQuotations

Queries the Quotations collection and returns a page of sales quotation documents, with OData query options for filtering, sorting, paging, and field selection.

Parameters:

NameTypeRequiredDescription
headersListQuotationsHeadersNoHeaders to be sent with the request, e.g. Prefer: odata.maxpagesize=100 for paging control
queriesListQuotationsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select

Returns: QuotationsCollectionResponse|error

Sample code:

QuotationsCollectionResponse result = check client->listQuotations();

Sample response:

{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#Quotations",
"value": [
{
"DocEntry": 8,
"DocNum": 8,
"CardCode": "C40000",
"CardName": "Earthshaker Corporation",
"DocDate": "2026-07-03",
"DocTotal": 4520.75
}
],
"odata.nextLink": "Quotations?$skip=20"
}
createQuotations

Creates a new sales quotation document and returns the created entity.

Parameters:

NameTypeRequiredDescription
payloadDocumentYesThe quotation document to create
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->createQuotations({CardCode: "C40000", DocDate: "2026-07-03"});

Sample response:

{
"DocEntry": 9,
"DocNum": 9,
"CardCode": "C40000",
"CardName": "Earthshaker Corporation",
"DocDate": "2026-07-03",
"DocTotal": 4520.75
}
getQuotations

Gets a single sales quotation document by its DocEntry key.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetQuotationsQueriesNoOData query options: $expand, $select

Returns: Document|error

Sample code:

Document result = check client->getQuotations(8);

Sample response:

{
"DocEntry": 8,
"DocNum": 8,
"CardCode": "C40000",
"CardName": "Earthshaker Corporation",
"DocDate": "2026-07-03",
"DocTotal": 4520.75
}
deleteQuotations

Deletes a sales quotation document identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteQuotations(8);
updateQuotations

Partially updates a sales quotation document (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
payloadDocumentYesThe document fields to update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->updateQuotations(8, {Comments: "Updated quotation"});
quotationsCancel

Invokes the bound action 'Cancel' on a sales quotation document to cancel it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->quotationsCancel(8);
quotationsClose

Invokes the bound action 'Close' on a sales quotation document to close it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->quotationsClose(8);
quotationsCreateCancellationDocument

Invokes the bound action 'CreateCancellationDocument' on a sales quotation to create and return its cancellation document.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->quotationsCreateCancellationDocument(8);

Sample response:

{
"DocEntry": 10,
"DocNum": 10,
"CardCode": "C40000",
"DocDate": "2026-07-04",
"Comments": "Cancellation document for quotation 8"
}
quotationsReopen

Invokes the bound action 'Reopen' on a sales quotation document to reopen it; no content is returned on success.

Parameters:

NameTypeRequiredDescription
docEntryint:Signed32YesKey property 'DocEntry' (Edm.Int32)
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->quotationsReopen(8);
quotationsServiceApproveAndAdd

Approves and adds a sales quotation document via the QuotationsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadQuotationsService_ApproveAndAdd_bodyYesRequest payload wrapping the Document to approve and add
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->quotationsServiceApproveAndAdd({document: {CardCode: "C40000", DocDate: "2026-07-03"}});
quotationsServiceApproveAndUpdate

Approves and updates a sales quotation document via the QuotationsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadQuotationsService_ApproveAndUpdate_bodyYesRequest payload wrapping the Document to approve and update
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->quotationsServiceApproveAndUpdate({document: {DocEntry: 8, Comments: "Approved"}});
quotationsServiceCloseByDate

Closes sales quotation documents by date via the QuotationsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadQuotationsService_CloseByDate_bodyYesRequest payload wrapping the DocumentCloseParams close criteria
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->quotationsServiceCloseByDate({documentCloseParams: {}});
quotationsServiceExportEWayBill

Exports the E-Way bill for a sales quotation document via the QuotationsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
payloadQuotationsService_ExportEWayBill_bodyYesRequest payload wrapping the Document whose E-Way bill is exported
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->quotationsServiceExportEWayBill({document: {DocEntry: 8}});
quotationsServiceGetApprovalTemplates

Gets the approval templates applicable to a sales quotation document via the QuotationsService.

Parameters:

NameTypeRequiredDescription
payloadQuotationsService_GetApprovalTemplates_bodyYesRequest payload wrapping the Document to evaluate
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->quotationsServiceGetApprovalTemplates({document: {CardCode: "C40000"}});

Sample response:

{
"DocEntry": 8,
"DocNum": 8,
"CardCode": "C40000",
"DocDate": "2026-07-03"
}
quotationsServiceHandleApprovalRequest

Handles a pending approval request for quotations via the QuotationsService; no content is returned on success.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: error?

Sample code:

check client->quotationsServiceHandleApprovalRequest();
quotationsServiceInitData

Initializes and returns a sales quotation document with default data via the QuotationsService.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: Document|error

Sample code:

Document result = check client->quotationsServiceInitData();

Sample response:

{
"DocDate": "2026-07-14",
"DocDueDate": "2026-07-14",
"DocCurrency": "USD",
"Series": 3
}