Actions
The ballerinax/sap.businessone.purchasing package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manages SAP Business One purchasing (A/P) documents — purchase requests & quotations, purchase orders & delivery notes, A/P invoices, credit notes & down payments, purchase returns & goods return requests, correction purchase invoices & reversals, landed costs & landed cost codes, and purchase tax invoices — over the session-authenticated Service Layer (OData V3). |
Client
The Client provides access to the purchasing (A/P) documents exposed by the SAP Business One Service Layer — purchase requests, quotations, orders, delivery notes, invoices, credit notes, down payments, returns, goods return requests, correction invoices and their reversals, landed costs, landed cost codes, and purchase tax invoices.
Configuration
SessionConfig
SAP Business One Service Layer session credentials, passed as the first argument to the client initializer.
| Field | Type | Default | Description |
|---|---|---|---|
companyDb | string | Required | The SAP Business One company database to log in to |
username | string | Required | The Service Layer user name |
password | string | Required | The 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.
| Field | Type | Default | Description |
|---|---|---|---|
httpVersion | http:HttpVersion | http:HTTP_2_0 | The HTTP version understood by the client |
http1Settings | http:ClientHttp1Settings | | Configurations related to HTTP/1.x protocol |
http2Settings | http:ClientHttp2Settings | | Configurations related to HTTP/2 protocol |
timeout | decimal | 30 | The maximum time to wait (in seconds) for a response before closing the connection |
forwarded | string | "disable" | The choice of setting forwarded/x-forwarded header |
followRedirects | http:FollowRedirects | Optional | Configurations associated with redirection |
poolConfig | http:PoolConfiguration | Optional | Configurations associated with request pooling |
cache | http:CacheConfig | | HTTP caching related configurations |
compression | http:Compression | http:COMPRESSION_AUTO | Specifies the way of handling compression (accept-encoding) header |
circuitBreaker | http:CircuitBreakerConfig | Optional | Configurations associated with the behaviour of the Circuit Breaker |
retryConfig | http:RetryConfig | Optional | Configurations associated with retrying |
cookieConfig | http:CookieConfig | Optional | Configurations associated with cookies |
responseLimits | http:ResponseLimitConfigs | | Configurations associated with inbound response size limits |
secureSocket | http:ClientSecureSocket | Optional | SSL/TLS-related options |
proxy | http:ProxyConfig | Optional | Proxy server related options |
socketConfig | http:ClientSocketConfig | | Provides settings related to client socket configuration |
validation | boolean | true | Enables the inbound payload validation functionality provided by the constraint package |
laxDataBinding | boolean | true | Enables 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.purchasing;
businessone:SessionConfig session = {
companyDb: "SBODemoUS",
username: "manager",
password: "<password>"
};
purchasing:Client client = check new (session, serviceUrl = "https://<host>:50000/b1s/v1");
Operations
CorrectionPurchaseInvoiceReversal
listCorrectionPurchaseInvoiceReversal
Queries the CorrectionPurchaseInvoiceReversal collection and returns a page of documents, supporting OData query options for paging, filtering, sorting, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListCorrectionPurchaseInvoiceReversalHeaders | No | Headers to be sent with the request; supports the Prefer header for Service Layer paging control (e.g. odata.maxpagesize=100) |
queries | ListCorrectionPurchaseInvoiceReversalQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, and $select |
Returns: CorrectionPurchaseInvoiceReversalCollectionResponse|error
Sample code:
CorrectionPurchaseInvoiceReversalCollectionResponse result = check client->listCorrectionPurchaseInvoiceReversal();
Sample response:
{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#CorrectionPurchaseInvoiceReversal",
"value": [
{
"DocEntry": 12,
"DocNum": 12,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
],
"odata.nextLink": "CorrectionPurchaseInvoiceReversal?$skip=20"
}
createCorrectionPurchaseInvoiceReversal
Creates a new correction purchase invoice reversal document and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | The document entity to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->createCorrectionPurchaseInvoiceReversal(payload);
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
getCorrectionPurchaseInvoiceReversal
Retrieves a single correction purchase invoice reversal document by its DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetCorrectionPurchaseInvoiceReversalQueries | No | OData query options: $expand and $select |
Returns: Document|error
Sample code:
Document result = check client->getCorrectionPurchaseInvoiceReversal(12);
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
deleteCorrectionPurchaseInvoiceReversal
Deletes the correction purchase invoice reversal document identified by the given DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteCorrectionPurchaseInvoiceReversal(12);
updateCorrectionPurchaseInvoiceReversal
Partially updates the correction purchase invoice reversal document identified by DocEntry using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | The document fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateCorrectionPurchaseInvoiceReversal(12, payload);
correctionPurchaseInvoiceReversalCancel
Invokes the bound action 'Cancel' on the CorrectionPurchaseInvoiceReversal document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReversalCancel(12);
correctionPurchaseInvoiceReversalClose
Invokes the bound action 'Close' on the CorrectionPurchaseInvoiceReversal document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReversalClose(12);
correctionPurchaseInvoiceReversalCreateCancellationDocument
Invokes the bound action 'CreateCancellationDocument' on the CorrectionPurchaseInvoiceReversal document identified by DocEntry and returns the resulting cancellation document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->correctionPurchaseInvoiceReversalCreateCancellationDocument(12);
Sample response:
{
"DocEntry": 13,
"DocNum": 13,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
correctionPurchaseInvoiceReversalReopen
Invokes the bound action 'Reopen' on the CorrectionPurchaseInvoiceReversal document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReversalReopen(12);
correctionPurchaseInvoiceReversalServiceApproveAndAdd
Approves and adds a correction purchase invoice reversal document via the CorrectionPurchaseInvoiceReversalService_ApproveAndAdd service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceReversalService_ApproveAndAdd_body | Yes | Request payload wrapping the Document to approve and add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReversalServiceApproveAndAdd(payload);
correctionPurchaseInvoiceReversalServiceApproveAndUpdate
Approves and updates a correction purchase invoice reversal document via the CorrectionPurchaseInvoiceReversalService_ApproveAndUpdate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceReversalService_ApproveAndUpdate_body | Yes | Request payload wrapping the Document to approve and update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReversalServiceApproveAndUpdate(payload);
correctionPurchaseInvoiceReversalServiceCloseByDate
Closes a correction purchase invoice reversal document by date via the CorrectionPurchaseInvoiceReversalService_CloseByDate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceReversalService_CloseByDate_body | Yes | Request payload wrapping DocumentCloseParams (docEntry, specifiedClosingDate, closingOption) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReversalServiceCloseByDate(payload);
correctionPurchaseInvoiceReversalServiceExportEWayBill
Exports an E-Way bill for a correction purchase invoice reversal document via the CorrectionPurchaseInvoiceReversalService_ExportEWayBill service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceReversalService_ExportEWayBill_body | Yes | Request payload wrapping the Document for which to export the E-Way bill |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReversalServiceExportEWayBill(payload);
correctionPurchaseInvoiceReversalServiceGetApprovalTemplates
Retrieves the approval templates applicable to a correction purchase invoice reversal document via the CorrectionPurchaseInvoiceReversalService_GetApprovalTemplates service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceReversalService_GetApprovalTemplates_body | Yes | Request payload wrapping the Document to evaluate for approval templates |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->correctionPurchaseInvoiceReversalServiceGetApprovalTemplates(payload);
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
correctionPurchaseInvoiceReversalServiceHandleApprovalRequest
Handles an approval request for correction purchase invoice reversals via the CorrectionPurchaseInvoiceReversalService_HandleApprovalRequest service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReversalServiceHandleApprovalRequest();
correctionPurchaseInvoiceReversalServiceInitData
Initializes document data via the CorrectionPurchaseInvoiceReversalService_InitData service operation and returns the initialized document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->correctionPurchaseInvoiceReversalServiceInitData();
Sample response:
{
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
PurchaseDownPayments
listPurchaseDownPayments
Queries the PurchaseDownPayments collection and returns a page of documents, supporting OData query options for paging, filtering, sorting, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseDownPaymentsHeaders | No | Headers to be sent with the request; supports the Prefer header for Service Layer paging control (e.g. odata.maxpagesize=100) |
queries | ListPurchaseDownPaymentsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, and $select |
Returns: PurchaseDownPaymentsCollectionResponse|error
Sample code:
PurchaseDownPaymentsCollectionResponse result = check client->listPurchaseDownPayments();
Sample response:
{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#PurchaseDownPayments",
"value": [
{
"DocEntry": 8,
"DocNum": 8,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
],
"odata.nextLink": "PurchaseDownPayments?$skip=20"
}
createPurchaseDownPayments
Creates a new purchase down payment document and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | The document entity to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->createPurchaseDownPayments(payload);
Sample response:
{
"DocEntry": 8,
"DocNum": 8,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
getPurchaseDownPayments
Retrieves a single purchase down payment document by its DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseDownPaymentsQueries | No | OData query options: $expand and $select |
Returns: Document|error
Sample code:
Document result = check client->getPurchaseDownPayments(8);
Sample response:
{
"DocEntry": 8,
"DocNum": 8,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
deletePurchaseDownPayments
Deletes the purchase down payment document identified by the given DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseDownPayments(8);
updatePurchaseDownPayments
Partially updates the purchase down payment document identified by DocEntry using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | The document fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseDownPayments(8, payload);
purchaseDownPaymentsCancel
Invokes the bound action 'Cancel' on the PurchaseDownPayments document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDownPaymentsCancel(8);
purchaseDownPaymentsClose
Invokes the bound action 'Close' on the PurchaseDownPayments document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDownPaymentsClose(8);
purchaseDownPaymentsCreateCancellationDocument
Invokes the bound action 'CreateCancellationDocument' on the PurchaseDownPayments document identified by DocEntry and returns the resulting cancellation document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseDownPaymentsCreateCancellationDocument(8);
Sample response:
{
"DocEntry": 9,
"DocNum": 9,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
purchaseDownPaymentsReopen
Invokes the bound action 'Reopen' on the PurchaseDownPayments document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDownPaymentsReopen(8);
purchaseDownPaymentsServiceApproveAndAdd
Approves and adds a purchase down payment document via the PurchaseDownPaymentsService_ApproveAndAdd service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDownPaymentsService_ApproveAndAdd_body | Yes | Request payload wrapping the Document to approve and add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDownPaymentsServiceApproveAndAdd(payload);
purchaseDownPaymentsServiceApproveAndUpdate
Approves and updates a purchase down payment document via the PurchaseDownPaymentsService_ApproveAndUpdate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDownPaymentsService_ApproveAndUpdate_body | Yes | Request payload wrapping the Document to approve and update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDownPaymentsServiceApproveAndUpdate(payload);
purchaseDownPaymentsServiceCloseByDate
Closes a purchase down payment document by date via the PurchaseDownPaymentsService_CloseByDate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDownPaymentsService_CloseByDate_body | Yes | Request payload wrapping DocumentCloseParams (docEntry, specifiedClosingDate, closingOption) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDownPaymentsServiceCloseByDate(payload);
purchaseDownPaymentsServiceExportEWayBill
Exports an E-Way bill for a purchase down payment document via the PurchaseDownPaymentsService_ExportEWayBill service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDownPaymentsService_ExportEWayBill_body | Yes | Request payload wrapping the Document for which to export the E-Way bill |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDownPaymentsServiceExportEWayBill(payload);
purchaseDownPaymentsServiceGetApprovalTemplates
Retrieves the approval templates applicable to a purchase down payment document via the PurchaseDownPaymentsService_GetApprovalTemplates service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDownPaymentsService_GetApprovalTemplates_body | Yes | Request payload wrapping the Document to evaluate for approval templates |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseDownPaymentsServiceGetApprovalTemplates(payload);
Sample response:
{
"DocEntry": 8,
"DocNum": 8,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
purchaseDownPaymentsServiceHandleApprovalRequest
Handles an approval request for purchase down payments via the PurchaseDownPaymentsService_HandleApprovalRequest service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDownPaymentsServiceHandleApprovalRequest();
purchaseDownPaymentsServiceInitData
Initializes document data via the PurchaseDownPaymentsService_InitData service operation and returns the initialized document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseDownPaymentsServiceInitData();
Sample response:
{
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
PurchaseInvoices
listPurchaseInvoices
Queries the PurchaseInvoices collection and returns a page of documents, supporting OData query options for paging, filtering, sorting, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseInvoicesHeaders | No | Headers to be sent with the request; supports the Prefer header for Service Layer paging control (e.g. odata.maxpagesize=100) |
queries | ListPurchaseInvoicesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, and $select |
Returns: PurchaseInvoicesCollectionResponse|error
Sample code:
PurchaseInvoicesCollectionResponse result = check client->listPurchaseInvoices();
Sample response:
{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#PurchaseInvoices",
"value": [
{
"DocEntry": 17,
"DocNum": 17,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
],
"odata.nextLink": "PurchaseInvoices?$skip=20"
}
createPurchaseInvoices
Creates a new purchase invoice document and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | The document entity to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->createPurchaseInvoices(payload);
Sample response:
{
"DocEntry": 17,
"DocNum": 17,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
getPurchaseInvoices
Retrieves a single purchase invoice document by its DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseInvoicesQueries | No | OData query options: $expand and $select |
Returns: Document|error
Sample code:
Document result = check client->getPurchaseInvoices(17);
Sample response:
{
"DocEntry": 17,
"DocNum": 17,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
deletePurchaseInvoices
Deletes the purchase invoice document identified by the given DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseInvoices(17);
updatePurchaseInvoices
Partially updates the purchase invoice document identified by DocEntry using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | The document fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseInvoices(17, payload);
purchaseInvoicesCancel
Invokes the bound action 'Cancel' on the PurchaseInvoices document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesCancel(17);
purchaseInvoicesClose
Invokes the bound action 'Close' on the PurchaseInvoices document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesClose(17);
purchaseInvoicesCreateCancellationDocument
Invokes the bound action 'CreateCancellationDocument' on the PurchaseInvoices document identified by DocEntry and returns the resulting cancellation document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseInvoicesCreateCancellationDocument(17);
Sample response:
{
"DocEntry": 18,
"DocNum": 18,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
purchaseInvoicesReopen
Invokes the bound action 'Reopen' on the PurchaseInvoices document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesReopen(17);
purchaseInvoicesServiceApproveAndAdd
Approves and adds a purchase invoice document via the PurchaseInvoicesService_ApproveAndAdd service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseInvoicesService_ApproveAndAdd_body | Yes | Request payload wrapping the Document to approve and add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesServiceApproveAndAdd(payload);
purchaseInvoicesServiceApproveAndUpdate
Approves and updates a purchase invoice document via the PurchaseInvoicesService_ApproveAndUpdate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseInvoicesService_ApproveAndUpdate_body | Yes | Request payload wrapping the Document to approve and update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesServiceApproveAndUpdate(payload);
purchaseInvoicesServiceCancel2
Cancels a purchase invoice via the PurchaseInvoicesService_Cancel2 service operation, passing the document in the request payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseInvoicesService_Cancel2_body | Yes | Request payload wrapping the Document to cancel |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesServiceCancel2(payload);
purchaseInvoicesServiceCloseByDate
Closes a purchase invoice document by date via the PurchaseInvoicesService_CloseByDate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseInvoicesService_CloseByDate_body | Yes | Request payload wrapping DocumentCloseParams (docEntry, specifiedClosingDate, closingOption) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesServiceCloseByDate(payload);
purchaseInvoicesServiceExportEWayBill
Exports an E-Way bill for a purchase invoice document via the PurchaseInvoicesService_ExportEWayBill service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseInvoicesService_ExportEWayBill_body | Yes | Request payload wrapping the Document for which to export the E-Way bill |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesServiceExportEWayBill(payload);
purchaseInvoicesServiceGetApprovalTemplates
Retrieves the approval templates applicable to a purchase invoice document via the PurchaseInvoicesService_GetApprovalTemplates service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseInvoicesService_GetApprovalTemplates_body | Yes | Request payload wrapping the Document to evaluate for approval templates |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseInvoicesServiceGetApprovalTemplates(payload);
Sample response:
{
"DocEntry": 17,
"DocNum": 17,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
purchaseInvoicesServiceHandleApprovalRequest
Handles an approval request for purchase invoices via the PurchaseInvoicesService_HandleApprovalRequest service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseInvoicesServiceHandleApprovalRequest();
purchaseInvoicesServiceInitData
Initializes document data via the PurchaseInvoicesService_InitData service operation and returns the initialized document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseInvoicesServiceInitData();
Sample response:
{
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
PurchaseRequests
purchaseRequestServiceApproveAndAdd
Approves and adds a purchase request document via the PurchaseRequestService_ApproveAndAdd service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseRequestService_ApproveAndAdd_body | Yes | Request payload wrapping the Document to approve and add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseRequestServiceApproveAndAdd(payload);
purchaseRequestServiceApproveAndUpdate
Approves and updates a purchase request document via the PurchaseRequestService_ApproveAndUpdate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseRequestService_ApproveAndUpdate_body | Yes | Request payload wrapping the Document to approve and update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseRequestServiceApproveAndUpdate(payload);
purchaseRequestServiceCloseByDate
Closes a purchase request document by date via the PurchaseRequestService_CloseByDate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseRequestService_CloseByDate_body | Yes | Request payload wrapping DocumentCloseParams (docEntry, specifiedClosingDate, closingOption) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseRequestServiceCloseByDate(payload);
purchaseRequestServiceExportEWayBill
Exports an E-Way bill for a purchase request document via the PurchaseRequestService_ExportEWayBill service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseRequestService_ExportEWayBill_body | Yes | Request payload wrapping the Document for which to export the E-Way bill |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseRequestServiceExportEWayBill(payload);
purchaseRequestServiceGetApprovalTemplates
Retrieves the approval templates applicable to a purchase request document via the PurchaseRequestService_GetApprovalTemplates service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseRequestService_GetApprovalTemplates_body | Yes | Request payload wrapping the Document to evaluate for approval templates |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseRequestServiceGetApprovalTemplates(payload);
Sample response:
{
"DocEntry": 5,
"DocNum": 5,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
purchaseRequestServiceHandleApprovalRequest
Handles an approval request for purchase requests via the PurchaseRequestService_HandleApprovalRequest service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseRequestServiceHandleApprovalRequest();
purchaseRequestServiceInitData
Initializes document data via the PurchaseRequestService_InitData service operation and returns the initialized document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseRequestServiceInitData();
Sample response:
{
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
listPurchaseRequests
Queries the PurchaseRequests collection and returns a page of documents, supporting OData query options for paging, filtering, sorting, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseRequestsHeaders | No | Headers to be sent with the request; supports the Prefer header for Service Layer paging control (e.g. odata.maxpagesize=100) |
queries | ListPurchaseRequestsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, and $select |
Returns: PurchaseRequestsCollectionResponse|error
Sample code:
PurchaseRequestsCollectionResponse result = check client->listPurchaseRequests();
Sample response:
{
"odata.metadata": "https://localhost:50000/b1s/v1/$metadata#PurchaseRequests",
"value": [
{
"DocEntry": 5,
"DocNum": 5,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
],
"odata.nextLink": "PurchaseRequests?$skip=20"
}
createPurchaseRequests
Creates a new purchase request document and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | The document entity to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->createPurchaseRequests(payload);
Sample response:
{
"DocEntry": 5,
"DocNum": 5,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
getPurchaseRequests
Retrieves a single purchase request document by its DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseRequestsQueries | No | OData query options: $expand and $select |
Returns: Document|error
Sample code:
Document result = check client->getPurchaseRequests(5);
Sample response:
{
"DocEntry": 5,
"DocNum": 5,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
deletePurchaseRequests
Deletes the purchase request document identified by the given DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseRequests(5);
updatePurchaseRequests
Partially updates the purchase request document identified by DocEntry using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | The document fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseRequests(5, payload);
purchaseRequestsCancel
Invokes the bound action 'Cancel' on the PurchaseRequests document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseRequestsCancel(5);
purchaseRequestsClose
Invokes the bound action 'Close' on the PurchaseRequests document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseRequestsClose(5);
purchaseRequestsCreateCancellationDocument
Invokes the bound action 'CreateCancellationDocument' on the PurchaseRequests document identified by DocEntry and returns the resulting cancellation document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseRequestsCreateCancellationDocument(5);
Sample response:
{
"DocEntry": 6,
"DocNum": 6,
"DocType": "dDocument_Items",
"DocDate": "2026-07-01"
}
purchaseRequestsReopen
Invokes the bound action 'Reopen' on the PurchaseRequests document identified by DocEntry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseRequestsReopen(5);
LandedCosts
listLandedCosts
Queries the LandedCosts collection and returns a page of landed cost entities, with optional OData query parameters for filtering, sorting, paging, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListLandedCostsHeaders | No | Headers to be sent with the request, e.g. the Prefer header for Service Layer paging control |
queries | ListLandedCostsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: LandedCostsCollectionResponse|error
Sample code:
LandedCostsCollectionResponse response = check client->listLandedCosts(dollarTop = 10);
Sample response:
{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#LandedCosts",
"value": [
{
"DocEntry": 1,
"LandedCostNumber": 1,
"PostingDate": "2026-07-01",
"VendorCode": "V10000",
"VendorName": "Acme Associates",
"ClosedDocument": "lcOpen",
"DocumentCurrency": "USD"
}
],
"odata.nextLink": "LandedCosts?$skip=20"
}
createLandedCosts
Creates a new LandedCost entity in SAP Business One and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | LandedCost | Yes | Request payload representing the landed cost to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: LandedCost|error
Sample code:
LandedCost created = check client->createLandedCosts({VendorCode: "V10000", PostingDate: "2026-07-01"});
Sample response:
{
"DocEntry": 5,
"LandedCostNumber": 5,
"PostingDate": "2026-07-01",
"VendorCode": "V10000",
"VendorName": "Acme Associates",
"ClosedDocument": "lcOpen",
"DocumentCurrency": "USD"
}
getLandedCosts
Retrieves a single LandedCost entity by its DocEntry key, with optional $expand and $select query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetLandedCostsQueries | No | OData query options: $expand, $select |
Returns: LandedCost|error
Sample code:
LandedCost landedCost = check client->getLandedCosts(5);
Sample response:
{
"DocEntry": 5,
"LandedCostNumber": 5,
"PostingDate": "2026-07-01",
"VendorCode": "V10000",
"VendorName": "Acme Associates",
"ClosedDocument": "lcOpen",
"DocumentCurrency": "USD"
}
deleteLandedCosts
Deletes a LandedCost entity identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteLandedCosts(5);
updateLandedCosts
Partially updates a LandedCost entity (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | LandedCost | Yes | Request payload containing the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateLandedCosts(5, {Remarks: "Updated remarks"});
landedCostsCancelLandedCost
Invokes the bound action 'CancelLandedCost' on a LandedCost entity identified by its DocEntry key to cancel the landed cost document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->landedCostsCancelLandedCost(5);
landedCostsCloseLandedCost
Invokes the bound action 'CloseLandedCost' on a LandedCost entity identified by its DocEntry key to close the landed cost document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->landedCostsCloseLandedCost(5);
landedCostsServiceGetLandedCostList
Retrieves the landed cost list via the LandedCostsService_GetLandedCostList service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: inline_response_200|error
Sample code:
inline_response_200 result = check client->landedCostsServiceGetLandedCostList();
Sample response:
{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#Collection(SAPB1.LandedCostParams)",
"value": [
{
"DocEntry": 1
},
{
"DocEntry": 2
}
]
}
PurchaseOrders
listPurchaseOrders
Queries the PurchaseOrders collection and returns a page of purchase order documents, with optional OData query parameters for filtering, sorting, paging, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseOrdersHeaders | No | Headers to be sent with the request, e.g. the Prefer header for Service Layer paging control |
queries | ListPurchaseOrdersQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: PurchaseOrdersCollectionResponse|error
Sample code:
PurchaseOrdersCollectionResponse response = check client->listPurchaseOrders(dollarTop = 10);
Sample response:
{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#PurchaseOrders",
"value": [
{
"DocEntry": 11,
"DocNum": 11,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 1500.0,
"DocCurrency": "USD"
}
],
"odata.nextLink": "PurchaseOrders?$skip=20"
}
createPurchaseOrders
Creates a new purchase order Document and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | Request payload representing the purchase order document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document created = check client->createPurchaseOrders({CardCode: "V10000", DocDueDate: "2026-07-31"});
Sample response:
{
"DocEntry": 11,
"DocNum": 11,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 1500.0,
"DocCurrency": "USD"
}
getPurchaseOrders
Retrieves a single purchase order Document by its DocEntry key, with optional $expand and $select query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseOrdersQueries | No | OData query options: $expand, $select |
Returns: Document|error
Sample code:
Document purchaseOrder = check client->getPurchaseOrders(11);
Sample response:
{
"DocEntry": 11,
"DocNum": 11,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 1500.0,
"DocCurrency": "USD"
}
deletePurchaseOrders
Deletes a purchase order Document identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseOrders(11);
updatePurchaseOrders
Partially updates a purchase order Document (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | Request payload containing the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseOrders(11, {Comments: "Updated comments"});
purchaseOrdersCancel
Invokes the bound action 'Cancel' on a purchase order Document identified by its DocEntry key to cancel the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseOrdersCancel(11);
purchaseOrdersClose
Invokes the bound action 'Close' on a purchase order Document identified by its DocEntry key to close the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseOrdersClose(11);
purchaseOrdersCreateCancellationDocument
Invokes the bound action 'CreateCancellationDocument' on a purchase order identified by its DocEntry key and returns the resulting cancellation Document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document cancellationDoc = check client->purchaseOrdersCreateCancellationDocument(11);
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"DocDate": "2026-07-02",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 1500.0
}
purchaseOrdersReopen
Invokes the bound action 'Reopen' on a purchase order Document identified by its DocEntry key to reopen the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseOrdersReopen(11);
purchaseOrdersServiceApproveAndAdd
Approves and adds a purchase order via the PurchaseOrdersService_ApproveAndAdd service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseOrdersService_ApproveAndAdd_body | Yes | Request payload wrapping the purchase order document to approve and add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseOrdersServiceApproveAndAdd({document: {CardCode: "V10000", DocDueDate: "2026-07-31"}});
purchaseOrdersServiceApproveAndUpdate
Approves and updates a purchase order via the PurchaseOrdersService_ApproveAndUpdate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseOrdersService_ApproveAndUpdate_body | Yes | Request payload wrapping the purchase order document to approve and update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseOrdersServiceApproveAndUpdate({document: {DocEntry: 11, Comments: "Approved"}});
purchaseOrdersServiceCloseByDate
Closes purchase orders by date via the PurchaseOrdersService_CloseByDate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseOrdersService_CloseByDate_body | Yes | Request payload wrapping the document close parameters |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseOrdersServiceCloseByDate({documentCloseParams: {docEntry: 11, specifiedClosingDate: "2026-07-31"}});
purchaseOrdersServiceExportEWayBill
Exports an e-way bill for a purchase order via the PurchaseOrdersService_ExportEWayBill service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseOrdersService_ExportEWayBill_body | Yes | Request payload wrapping the purchase order document |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseOrdersServiceExportEWayBill({document: {DocEntry: 11}});
purchaseOrdersServiceGetApprovalTemplates
Gets the approval templates for a purchase order via the PurchaseOrdersService_GetApprovalTemplates service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseOrdersService_GetApprovalTemplates_body | Yes | Request payload wrapping the purchase order document to evaluate |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseOrdersServiceGetApprovalTemplates({document: {CardCode: "V10000"}});
Sample response:
{
"DocEntry": 11,
"DocNum": 11,
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 1500.0
}
purchaseOrdersServiceHandleApprovalRequest
Handles an approval request for purchase orders via the PurchaseOrdersService_HandleApprovalRequest service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseOrdersServiceHandleApprovalRequest();
purchaseOrdersServiceInitData
Initializes purchase order data via the PurchaseOrdersService_InitData service operation and returns the initialized Document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document initData = check client->purchaseOrdersServiceInitData();
Sample response:
{
"DocDate": "2026-07-14",
"DocDueDate": "2026-07-14",
"DocCurrency": "USD",
"DocRate": 1.0
}
PurchaseQuotations
listPurchaseQuotations
Queries the PurchaseQuotations collection and returns a page of purchase quotation documents, with optional OData query parameters for filtering, sorting, paging, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseQuotationsHeaders | No | Headers to be sent with the request, e.g. the Prefer header for Service Layer paging control |
queries | ListPurchaseQuotationsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: PurchaseQuotationsCollectionResponse|error
Sample code:
PurchaseQuotationsCollectionResponse response = check client->listPurchaseQuotations(dollarTop = 10);
Sample response:
{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#PurchaseQuotations",
"value": [
{
"DocEntry": 7,
"DocNum": 7,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 850.0,
"DocCurrency": "USD"
}
],
"odata.nextLink": "PurchaseQuotations?$skip=20"
}
createPurchaseQuotations
Creates a new purchase quotation Document and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | Request payload representing the purchase quotation document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document created = check client->createPurchaseQuotations({CardCode: "V10000", DocDueDate: "2026-07-31"});
Sample response:
{
"DocEntry": 7,
"DocNum": 7,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 850.0,
"DocCurrency": "USD"
}
getPurchaseQuotations
Retrieves a single purchase quotation Document by its DocEntry key, with optional $expand and $select query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseQuotationsQueries | No | OData query options: $expand, $select |
Returns: Document|error
Sample code:
Document quotation = check client->getPurchaseQuotations(7);
Sample response:
{
"DocEntry": 7,
"DocNum": 7,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 850.0,
"DocCurrency": "USD"
}
deletePurchaseQuotations
Deletes a purchase quotation Document identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseQuotations(7);
updatePurchaseQuotations
Partially updates a purchase quotation Document (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | Request payload containing the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseQuotations(7, {Comments: "Updated comments"});
purchaseQuotationsCancel
Invokes the bound action 'Cancel' on a purchase quotation Document identified by its DocEntry key to cancel the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseQuotationsCancel(7);
purchaseQuotationsClose
Invokes the bound action 'Close' on a purchase quotation Document identified by its DocEntry key to close the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseQuotationsClose(7);
purchaseQuotationsCreateCancellationDocument
Invokes the bound action 'CreateCancellationDocument' on a purchase quotation identified by its DocEntry key and returns the resulting cancellation Document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document cancellationDoc = check client->purchaseQuotationsCreateCancellationDocument(7);
Sample response:
{
"DocEntry": 8,
"DocNum": 8,
"DocDate": "2026-07-02",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 850.0
}
purchaseQuotationsReopen
Invokes the bound action 'Reopen' on a purchase quotation Document identified by its DocEntry key to reopen the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseQuotationsReopen(7);
purchaseQuotationsServiceApproveAndAdd
Approves and adds a purchase quotation via the PurchaseQuotationsService_ApproveAndAdd service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseQuotationsService_ApproveAndAdd_body | Yes | Request payload wrapping the purchase quotation document to approve and add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseQuotationsServiceApproveAndAdd({document: {CardCode: "V10000", DocDueDate: "2026-07-31"}});
purchaseQuotationsServiceApproveAndUpdate
Approves and updates a purchase quotation via the PurchaseQuotationsService_ApproveAndUpdate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseQuotationsService_ApproveAndUpdate_body | Yes | Request payload wrapping the purchase quotation document to approve and update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseQuotationsServiceApproveAndUpdate({document: {DocEntry: 7, Comments: "Approved"}});
purchaseQuotationsServiceCloseByDate
Closes purchase quotations by date via the PurchaseQuotationsService_CloseByDate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseQuotationsService_CloseByDate_body | Yes | Request payload wrapping the document close parameters |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseQuotationsServiceCloseByDate({documentCloseParams: {docEntry: 7, specifiedClosingDate: "2026-07-31"}});
purchaseQuotationsServiceExportEWayBill
Exports an e-way bill for a purchase quotation via the PurchaseQuotationsService_ExportEWayBill service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseQuotationsService_ExportEWayBill_body | Yes | Request payload wrapping the purchase quotation document |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseQuotationsServiceExportEWayBill({document: {DocEntry: 7}});
purchaseQuotationsServiceGetApprovalTemplates
Gets the approval templates for a purchase quotation via the PurchaseQuotationsService_GetApprovalTemplates service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseQuotationsService_GetApprovalTemplates_body | Yes | Request payload wrapping the purchase quotation document to evaluate |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseQuotationsServiceGetApprovalTemplates({document: {CardCode: "V10000"}});
Sample response:
{
"DocEntry": 7,
"DocNum": 7,
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 850.0
}
purchaseQuotationsServiceHandleApprovalRequest
Handles an approval request for purchase quotations via the PurchaseQuotationsService_HandleApprovalRequest service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseQuotationsServiceHandleApprovalRequest();
purchaseQuotationsServiceInitData
Initializes purchase quotation data via the PurchaseQuotationsService_InitData service operation and returns the initialized Document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document initData = check client->purchaseQuotationsServiceInitData();
Sample response:
{
"DocDate": "2026-07-14",
"DocDueDate": "2026-07-14",
"DocCurrency": "USD",
"DocRate": 1.0
}
PurchaseReturns
listPurchaseReturns
Queries the PurchaseReturns collection and returns a page of purchase return documents, with optional OData query parameters for filtering, sorting, paging, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseReturnsHeaders | No | Headers to be sent with the request, e.g. the Prefer header for Service Layer paging control |
queries | ListPurchaseReturnsQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: PurchaseReturnsCollectionResponse|error
Sample code:
PurchaseReturnsCollectionResponse response = check client->listPurchaseReturns(dollarTop = 10);
Sample response:
{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#PurchaseReturns",
"value": [
{
"DocEntry": 3,
"DocNum": 3,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 320.0,
"DocCurrency": "USD"
}
],
"odata.nextLink": "PurchaseReturns?$skip=20"
}
createPurchaseReturns
Creates a new purchase return Document and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | Request payload representing the purchase return document to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document created = check client->createPurchaseReturns({CardCode: "V10000", DocDueDate: "2026-07-31"});
Sample response:
{
"DocEntry": 3,
"DocNum": 3,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 320.0,
"DocCurrency": "USD"
}
getPurchaseReturns
Retrieves a single purchase return Document by its DocEntry key, with optional $expand and $select query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseReturnsQueries | No | OData query options: $expand, $select |
Returns: Document|error
Sample code:
Document purchaseReturn = check client->getPurchaseReturns(3);
Sample response:
{
"DocEntry": 3,
"DocNum": 3,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 320.0,
"DocCurrency": "USD"
}
deletePurchaseReturns
Deletes a purchase return Document identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseReturns(3);
updatePurchaseReturns
Partially updates a purchase return Document (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | Request payload containing the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseReturns(3, {Comments: "Updated comments"});
purchaseReturnsCancel
Invokes the bound action 'Cancel' on a purchase return Document identified by its DocEntry key to cancel the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsCancel(3);
purchaseReturnsClose
Invokes the bound action 'Close' on a purchase return Document identified by its DocEntry key to close the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsClose(3);
purchaseReturnsCreateCancellationDocument
Invokes the bound action 'CreateCancellationDocument' on a purchase return identified by its DocEntry key and returns the resulting cancellation Document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document cancellationDoc = check client->purchaseReturnsCreateCancellationDocument(3);
Sample response:
{
"DocEntry": 4,
"DocNum": 4,
"DocDate": "2026-07-02",
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 320.0
}
purchaseReturnsReopen
Invokes the bound action 'Reopen' on a purchase return Document identified by its DocEntry key to reopen the document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsReopen(3);
purchaseReturnsServiceApproveAndAdd
Approves and adds a purchase return via the PurchaseReturnsService_ApproveAndAdd service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseReturnsService_ApproveAndAdd_body | Yes | Request payload wrapping the purchase return document to approve and add |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsServiceApproveAndAdd({document: {CardCode: "V10000", DocDueDate: "2026-07-31"}});
purchaseReturnsServiceApproveAndUpdate
Approves and updates a purchase return via the PurchaseReturnsService_ApproveAndUpdate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseReturnsService_ApproveAndUpdate_body | Yes | Request payload wrapping the purchase return document to approve and update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsServiceApproveAndUpdate({document: {DocEntry: 3, Comments: "Approved"}});
purchaseReturnsServiceCancel2
Cancels a purchase return via the PurchaseReturnsService_Cancel2 service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseReturnsService_Cancel2_body | Yes | Request payload wrapping the purchase return document to cancel |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsServiceCancel2({document: {DocEntry: 3}});
purchaseReturnsServiceCloseByDate
Closes purchase returns by date via the PurchaseReturnsService_CloseByDate service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseReturnsService_CloseByDate_body | Yes | Request payload wrapping the document close parameters |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsServiceCloseByDate({documentCloseParams: {docEntry: 3, specifiedClosingDate: "2026-07-31"}});
purchaseReturnsServiceExportEWayBill
Exports an e-way bill for a purchase return via the PurchaseReturnsService_ExportEWayBill service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseReturnsService_ExportEWayBill_body | Yes | Request payload wrapping the purchase return document |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsServiceExportEWayBill({document: {DocEntry: 3}});
purchaseReturnsServiceGetApprovalTemplates
Gets the approval templates for a purchase return via the PurchaseReturnsService_GetApprovalTemplates service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseReturnsService_GetApprovalTemplates_body | Yes | Request payload wrapping the purchase return document to evaluate |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseReturnsServiceGetApprovalTemplates({document: {CardCode: "V10000"}});
Sample response:
{
"DocEntry": 3,
"DocNum": 3,
"CardCode": "V10000",
"CardName": "Acme Associates",
"DocTotal": 320.0
}
purchaseReturnsServiceHandleApprovalRequest
Handles an approval request for purchase returns via the PurchaseReturnsService_HandleApprovalRequest service operation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseReturnsServiceHandleApprovalRequest();
purchaseReturnsServiceInitData
Initializes purchase return data via the PurchaseReturnsService_InitData service operation and returns the initialized Document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document initData = check client->purchaseReturnsServiceInitData();
Sample response:
{
"DocDate": "2026-07-14",
"DocDueDate": "2026-07-14",
"DocCurrency": "USD",
"DocRate": 1.0
}
PurchaseTaxInvoices
listPurchaseTaxInvoices
Queries the PurchaseTaxInvoices collection and returns a page of purchase tax invoice entities, with optional OData query parameters for filtering, sorting, paging, and field selection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseTaxInvoicesHeaders | No | Headers to be sent with the request, e.g. the Prefer header for Service Layer paging control |
queries | ListPurchaseTaxInvoicesQueries | No | OData query options: $skip, $top, $filter, $orderby, $expand, $inlinecount, $select |
Returns: PurchaseTaxInvoicesCollectionResponse|error
Sample code:
PurchaseTaxInvoicesCollectionResponse response = check client->listPurchaseTaxInvoices(dollarTop = 10);
Sample response:
{
"odata.metadata": "https://server:50000/b1s/v2/$metadata#PurchaseTaxInvoices",
"value": [
{
"DocEntry": 2,
"DocNum": 2,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"TaxDate": "2026-07-01",
"Comments": "Q3 tax invoice"
}
],
"odata.nextLink": "PurchaseTaxInvoices?$skip=20"
}
createPurchaseTaxInvoices
Creates a new PurchaseTaxInvoice entity and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseTaxInvoice | Yes | Request payload representing the purchase tax invoice to create |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: PurchaseTaxInvoice|error
Sample code:
PurchaseTaxInvoice created = check client->createPurchaseTaxInvoices({CardCode: "V10000", DocDate: "2026-07-01"});
Sample response:
{
"DocEntry": 2,
"DocNum": 2,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"TaxDate": "2026-07-01",
"Comments": "Q3 tax invoice"
}
getPurchaseTaxInvoices
Retrieves a single PurchaseTaxInvoice entity by its DocEntry key, with optional $expand and $select query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseTaxInvoicesQueries | No | OData query options: $expand, $select |
Returns: PurchaseTaxInvoice|error
Sample code:
PurchaseTaxInvoice taxInvoice = check client->getPurchaseTaxInvoices(2);
Sample response:
{
"DocEntry": 2,
"DocNum": 2,
"DocDate": "2026-07-01",
"DocDueDate": "2026-07-31",
"CardCode": "V10000",
"TaxDate": "2026-07-01",
"Comments": "Q3 tax invoice"
}
deletePurchaseTaxInvoices
Deletes a PurchaseTaxInvoice entity identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseTaxInvoices(2);
updatePurchaseTaxInvoices
Partially updates a PurchaseTaxInvoice entity (PATCH/MERGE semantics) identified by its DocEntry key; no content is returned on success.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | PurchaseTaxInvoice | Yes | Request payload containing the fields to update |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseTaxInvoices(2, {Comments: "Updated comments"});
PurchaseCreditNotes
listPurchaseCreditNotes
Retrieves a paged collection of PurchaseCreditNotes entities from the SAP Business One Service Layer, supporting OData query options for filtering, sorting, and paging.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseCreditNotesHeaders | No | Headers to be sent with the request |
queries | ListPurchaseCreditNotesQueries | No | Query parameters ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select) to be sent with the request |
Returns: PurchaseCreditNotesCollectionResponse|error
Sample code:
PurchaseCreditNotesCollectionResponse result = check client->listPurchaseCreditNotes();
Sample response:
{
"odata.metadata": "$metadata#PurchaseCreditNotes",
"value": [
{
"DocEntry": 181,
"DocNum": 181,
"CardCode": "V10000",
"CardName": "Example Vendor",
"DocDate": "2026-07-01",
"DocTotal": 1250.00
}
],
"odata.nextLink": "PurchaseCreditNotes?$skip=20"
}
createPurchaseCreditNotes
Creates a new PurchaseCreditNotes document in SAP Business One from the given payload and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->createPurchaseCreditNotes(payload);
Sample response:
{
"DocEntry": 181,
"DocNum": 181,
"CardCode": "V10000",
"CardName": "Example Vendor",
"DocDate": "2026-07-01",
"DocTotal": 1250.00
}
getPurchaseCreditNotes
Retrieves a single PurchaseCreditNotes document identified by its DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseCreditNotesQueries | No | Query parameters ($expand, $select) to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->getPurchaseCreditNotes(181);
Sample response:
{
"DocEntry": 181,
"DocNum": 181,
"CardCode": "V10000",
"CardName": "Example Vendor",
"DocDate": "2026-07-01",
"DocTotal": 1250.00
}
deletePurchaseCreditNotes
Deletes the PurchaseCreditNotes document identified by the given DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseCreditNotes(181);
updatePurchaseCreditNotes
Partially updates the PurchaseCreditNotes document identified by DocEntry using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseCreditNotes(181, payload);
purchaseCreditNotesCancel
Invokes the bound Cancel action on the PurchaseCreditNotes document, cancelling the posted document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesCancel(181);
purchaseCreditNotesClose
Invokes the bound Close action on the PurchaseCreditNotes document, closing the open document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesClose(181);
purchaseCreditNotesCreateCancellationDocument
Invokes the bound CreateCancellationDocument action, generating a cancellation document for the given PurchaseCreditNotes document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseCreditNotesCreateCancellationDocument(181);
Sample response:
{
"DocEntry": 205,
"DocNum": 205,
"CardCode": "V10000",
"DocDate": "2026-07-10",
"DocTotal": 1250.00
}
purchaseCreditNotesReopen
Invokes the bound Reopen action, reopening a previously closed PurchaseCreditNotes document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesReopen(181);
purchaseCreditNotesServiceApproveAndAdd
Approves a pending PurchaseCreditNotes document and adds it, completing an approval workflow that creates the underlying document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseCreditNotesService_ApproveAndAdd_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesServiceApproveAndAdd(payload);
purchaseCreditNotesServiceApproveAndUpdate
Approves a pending change and updates the existing PurchaseCreditNotes document as part of the approval workflow.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseCreditNotesService_ApproveAndUpdate_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesServiceApproveAndUpdate(payload);
purchaseCreditNotesServiceCancel2
Cancels a posted PurchaseCreditNotes document via the alternate Cancel2 service action using the supplied document payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseCreditNotesService_Cancel2_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesServiceCancel2(payload);
purchaseCreditNotesServiceCloseByDate
Closes one or more PurchaseCreditNotes documents as of a specified closing date via DocumentCloseParams.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseCreditNotesService_CloseByDate_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesServiceCloseByDate(payload);
purchaseCreditNotesServiceExportEWayBill
Exports the E-Way Bill details for the given PurchaseCreditNotes document (India localization).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseCreditNotesService_ExportEWayBill_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesServiceExportEWayBill(payload);
purchaseCreditNotesServiceGetApprovalTemplates
Retrieves the approval templates applicable to the given PurchaseCreditNotes document payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseCreditNotesService_GetApprovalTemplates_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseCreditNotesServiceGetApprovalTemplates(payload);
Sample response:
{
"DocEntry": 181,
"DocNum": 181,
"CardCode": "V10000",
"DocDate": "2026-07-01"
}
purchaseCreditNotesServiceHandleApprovalRequest
Handles an incoming approval request notification for the PurchaseCreditNotes approval workflow.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseCreditNotesServiceHandleApprovalRequest();
purchaseCreditNotesServiceInitData
Initializes and returns default data used when creating a new PurchaseCreditNotes document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseCreditNotesServiceInitData();
Sample response:
{
"DocEntry": 0,
"DocDate": "2026-07-10",
"CardCode": "",
"DocCurrency": "USD"
}
PurchaseDeliveryNotes
listPurchaseDeliveryNotes
Retrieves a paged collection of PurchaseDeliveryNotes entities from the SAP Business One Service Layer, supporting OData query options for filtering, sorting, and paging.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListPurchaseDeliveryNotesHeaders | No | Headers to be sent with the request |
queries | ListPurchaseDeliveryNotesQueries | No | Query parameters ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select) to be sent with the request |
Returns: PurchaseDeliveryNotesCollectionResponse|error
Sample code:
PurchaseDeliveryNotesCollectionResponse result = check client->listPurchaseDeliveryNotes();
Sample response:
{
"odata.metadata": "$metadata#PurchaseDeliveryNotes",
"value": [
{
"DocEntry": 302,
"DocNum": 302,
"CardCode": "V20000",
"CardName": "Example Supplier",
"DocDate": "2026-07-05",
"DocTotal": 4300.50
}
],
"odata.nextLink": "PurchaseDeliveryNotes?$skip=20"
}
createPurchaseDeliveryNotes
Creates a new PurchaseDeliveryNotes document in SAP Business One from the given payload and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->createPurchaseDeliveryNotes(payload);
Sample response:
{
"DocEntry": 302,
"DocNum": 302,
"CardCode": "V20000",
"CardName": "Example Supplier",
"DocDate": "2026-07-05",
"DocTotal": 4300.50
}
getPurchaseDeliveryNotes
Retrieves a single PurchaseDeliveryNotes document identified by its DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetPurchaseDeliveryNotesQueries | No | Query parameters ($expand, $select) to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->getPurchaseDeliveryNotes(302);
Sample response:
{
"DocEntry": 302,
"DocNum": 302,
"CardCode": "V20000",
"CardName": "Example Supplier",
"DocDate": "2026-07-05",
"DocTotal": 4300.50
}
deletePurchaseDeliveryNotes
Deletes the PurchaseDeliveryNotes document identified by the given DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deletePurchaseDeliveryNotes(302);
updatePurchaseDeliveryNotes
Partially updates the PurchaseDeliveryNotes document identified by DocEntry using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updatePurchaseDeliveryNotes(302, payload);
purchaseDeliveryNotesCancel
Invokes the bound Cancel action on the PurchaseDeliveryNotes document, cancelling the posted document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesCancel(302);
purchaseDeliveryNotesClose
Invokes the bound Close action on the PurchaseDeliveryNotes document, closing the open document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesClose(302);
purchaseDeliveryNotesCreateCancellationDocument
Invokes the bound CreateCancellationDocument action, generating a cancellation document for the given PurchaseDeliveryNotes document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseDeliveryNotesCreateCancellationDocument(302);
Sample response:
{
"DocEntry": 340,
"DocNum": 340,
"CardCode": "V20000",
"DocDate": "2026-07-10",
"DocTotal": 4300.50
}
purchaseDeliveryNotesReopen
Invokes the bound Reopen action, reopening a previously closed PurchaseDeliveryNotes document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesReopen(302);
purchaseDeliveryNotesServiceApproveAndAdd
Approves a pending PurchaseDeliveryNotes document and adds it, completing an approval workflow that creates the underlying document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDeliveryNotesService_ApproveAndAdd_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesServiceApproveAndAdd(payload);
purchaseDeliveryNotesServiceApproveAndUpdate
Approves a pending change and updates the existing PurchaseDeliveryNotes document as part of the approval workflow.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDeliveryNotesService_ApproveAndUpdate_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesServiceApproveAndUpdate(payload);
purchaseDeliveryNotesServiceCancel2
Cancels a posted PurchaseDeliveryNotes document via the alternate Cancel2 service action using the supplied document payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDeliveryNotesService_Cancel2_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesServiceCancel2(payload);
purchaseDeliveryNotesServiceCloseByDate
Closes one or more PurchaseDeliveryNotes documents as of a specified closing date via DocumentCloseParams.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDeliveryNotesService_CloseByDate_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesServiceCloseByDate(payload);
purchaseDeliveryNotesServiceExportEWayBill
Exports the E-Way Bill details for the given PurchaseDeliveryNotes document (India localization).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDeliveryNotesService_ExportEWayBill_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesServiceExportEWayBill(payload);
purchaseDeliveryNotesServiceGetApprovalTemplates
Retrieves the approval templates applicable to the given PurchaseDeliveryNotes document payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | PurchaseDeliveryNotesService_GetApprovalTemplates_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseDeliveryNotesServiceGetApprovalTemplates(payload);
Sample response:
{
"DocEntry": 302,
"DocNum": 302,
"CardCode": "V20000",
"DocDate": "2026-07-05"
}
purchaseDeliveryNotesServiceHandleApprovalRequest
Handles an incoming approval request notification for the PurchaseDeliveryNotes approval workflow.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->purchaseDeliveryNotesServiceHandleApprovalRequest();
purchaseDeliveryNotesServiceInitData
Initializes and returns default data used when creating a new PurchaseDeliveryNotes document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->purchaseDeliveryNotesServiceInitData();
Sample response:
{
"DocEntry": 0,
"DocDate": "2026-07-10",
"CardCode": "",
"DocCurrency": "USD"
}
GoodsReturnRequest
listGoodsReturnRequest
Retrieves a paged collection of GoodsReturnRequest entities from the SAP Business One Service Layer, supporting OData query options for filtering, sorting, and paging.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListGoodsReturnRequestHeaders | No | Headers to be sent with the request |
queries | ListGoodsReturnRequestQueries | No | Query parameters ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select) to be sent with the request |
Returns: GoodsReturnRequestCollectionResponse|error
Sample code:
GoodsReturnRequestCollectionResponse result = check client->listGoodsReturnRequest();
Sample response:
{
"odata.metadata": "$metadata#GoodsReturnRequest",
"value": [
{
"DocEntry": 55,
"DocNum": 55,
"CardCode": "V30000",
"CardName": "Example Vendor",
"DocDate": "2026-07-02",
"DocTotal": 620.00
}
],
"odata.nextLink": "GoodsReturnRequest?$skip=20"
}
createGoodsReturnRequest
Creates a new GoodsReturnRequest document in SAP Business One from the given payload and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->createGoodsReturnRequest(payload);
Sample response:
{
"DocEntry": 55,
"DocNum": 55,
"CardCode": "V30000",
"CardName": "Example Vendor",
"DocDate": "2026-07-02",
"DocTotal": 620.00
}
getGoodsReturnRequest
Retrieves a single GoodsReturnRequest document identified by its DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetGoodsReturnRequestQueries | No | Query parameters ($expand, $select) to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->getGoodsReturnRequest(55);
Sample response:
{
"DocEntry": 55,
"DocNum": 55,
"CardCode": "V30000",
"CardName": "Example Vendor",
"DocDate": "2026-07-02",
"DocTotal": 620.00
}
deleteGoodsReturnRequest
Deletes the GoodsReturnRequest document identified by the given DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteGoodsReturnRequest(55);
updateGoodsReturnRequest
Partially updates the GoodsReturnRequest document identified by DocEntry using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateGoodsReturnRequest(55, payload);
goodsReturnRequestCancel
Invokes the bound Cancel action on the GoodsReturnRequest document, cancelling the posted document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->goodsReturnRequestCancel(55);
goodsReturnRequestClose
Invokes the bound Close action on the GoodsReturnRequest document, closing the open document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->goodsReturnRequestClose(55);
goodsReturnRequestCreateCancellationDocument
Invokes the bound CreateCancellationDocument action, generating a cancellation document for the given GoodsReturnRequest document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->goodsReturnRequestCreateCancellationDocument(55);
Sample response:
{
"DocEntry": 61,
"DocNum": 61,
"CardCode": "V30000",
"DocDate": "2026-07-10",
"DocTotal": 620.00
}
goodsReturnRequestReopen
Invokes the bound Reopen action, reopening a previously closed GoodsReturnRequest document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->goodsReturnRequestReopen(55);
goodsReturnRequestServiceApproveAndAdd
Approves a pending GoodsReturnRequest document and adds it, completing an approval workflow that creates the underlying document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | GoodsReturnRequestService_ApproveAndAdd_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->goodsReturnRequestServiceApproveAndAdd(payload);
goodsReturnRequestServiceApproveAndUpdate
Approves a pending change and updates the existing GoodsReturnRequest document as part of the approval workflow.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | GoodsReturnRequestService_ApproveAndUpdate_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->goodsReturnRequestServiceApproveAndUpdate(payload);
goodsReturnRequestServiceCloseByDate
Closes one or more GoodsReturnRequest documents as of a specified closing date via DocumentCloseParams.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | GoodsReturnRequestService_CloseByDate_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->goodsReturnRequestServiceCloseByDate(payload);
goodsReturnRequestServiceExportEWayBill
Exports the E-Way Bill details for the given GoodsReturnRequest document (India localization).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | GoodsReturnRequestService_ExportEWayBill_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->goodsReturnRequestServiceExportEWayBill(payload);
goodsReturnRequestServiceGetApprovalTemplates
Retrieves the approval templates applicable to the given GoodsReturnRequest document payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | GoodsReturnRequestService_GetApprovalTemplates_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->goodsReturnRequestServiceGetApprovalTemplates(payload);
Sample response:
{
"DocEntry": 55,
"DocNum": 55,
"CardCode": "V30000",
"DocDate": "2026-07-02"
}
goodsReturnRequestServiceHandleApprovalRequest
Handles an incoming approval request notification for the GoodsReturnRequest approval workflow.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->goodsReturnRequestServiceHandleApprovalRequest();
goodsReturnRequestServiceInitData
Initializes and returns default data used when creating a new GoodsReturnRequest document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->goodsReturnRequestServiceInitData();
Sample response:
{
"DocEntry": 0,
"DocDate": "2026-07-10",
"CardCode": "",
"DocCurrency": "USD"
}
CorrectionPurchaseInvoice
listCorrectionPurchaseInvoice
Retrieves a paged collection of CorrectionPurchaseInvoice entities from the SAP Business One Service Layer, supporting OData query options for filtering, sorting, and paging.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListCorrectionPurchaseInvoiceHeaders | No | Headers to be sent with the request |
queries | ListCorrectionPurchaseInvoiceQueries | No | Query parameters ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select) to be sent with the request |
Returns: CorrectionPurchaseInvoiceCollectionResponse|error
Sample code:
CorrectionPurchaseInvoiceCollectionResponse result = check client->listCorrectionPurchaseInvoice();
Sample response:
{
"odata.metadata": "$metadata#CorrectionPurchaseInvoice",
"value": [
{
"DocEntry": 12,
"DocNum": 12,
"CardCode": "V40000",
"CardName": "Example Vendor",
"DocDate": "2026-07-03",
"DocTotal": 980.25
}
],
"odata.nextLink": "CorrectionPurchaseInvoice?$skip=20"
}
createCorrectionPurchaseInvoice
Creates a new CorrectionPurchaseInvoice document in SAP Business One from the given payload and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | Document | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->createCorrectionPurchaseInvoice(payload);
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"CardCode": "V40000",
"CardName": "Example Vendor",
"DocDate": "2026-07-03",
"DocTotal": 980.25
}
getCorrectionPurchaseInvoice
Retrieves a single CorrectionPurchaseInvoice document identified by its DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetCorrectionPurchaseInvoiceQueries | No | Query parameters ($expand, $select) to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->getCorrectionPurchaseInvoice(12);
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"CardCode": "V40000",
"CardName": "Example Vendor",
"DocDate": "2026-07-03",
"DocTotal": 980.25
}
deleteCorrectionPurchaseInvoice
Deletes the CorrectionPurchaseInvoice document identified by the given DocEntry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteCorrectionPurchaseInvoice(12);
updateCorrectionPurchaseInvoice
Partially updates the CorrectionPurchaseInvoice document identified by DocEntry using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
payload | Document | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateCorrectionPurchaseInvoice(12, payload);
correctionPurchaseInvoiceCancel
Invokes the bound Cancel action on the CorrectionPurchaseInvoice document, cancelling the posted document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceCancel(12);
correctionPurchaseInvoiceClose
Invokes the bound Close action on the CorrectionPurchaseInvoice document, closing the open document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceClose(12);
correctionPurchaseInvoiceCreateCancellationDocument
Invokes the bound CreateCancellationDocument action, generating a cancellation document for the given CorrectionPurchaseInvoice document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->correctionPurchaseInvoiceCreateCancellationDocument(12);
Sample response:
{
"DocEntry": 18,
"DocNum": 18,
"CardCode": "V40000",
"DocDate": "2026-07-10",
"DocTotal": 980.25
}
correctionPurchaseInvoiceReopen
Invokes the bound Reopen action, reopening a previously closed CorrectionPurchaseInvoice document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
docEntry | int:Signed32 | Yes | Key property 'DocEntry' (Edm.Int32) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceReopen(12);
correctionPurchaseInvoiceServiceApproveAndAdd
Approves a pending CorrectionPurchaseInvoice document and adds it, completing an approval workflow that creates the underlying document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceService_ApproveAndAdd_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceServiceApproveAndAdd(payload);
correctionPurchaseInvoiceServiceApproveAndUpdate
Approves a pending change and updates the existing CorrectionPurchaseInvoice document as part of the approval workflow.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceService_ApproveAndUpdate_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceServiceApproveAndUpdate(payload);
correctionPurchaseInvoiceServiceCloseByDate
Closes one or more CorrectionPurchaseInvoice documents as of a specified closing date via DocumentCloseParams.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceService_CloseByDate_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceServiceCloseByDate(payload);
correctionPurchaseInvoiceServiceExportEWayBill
Exports the E-Way Bill details for the given CorrectionPurchaseInvoice document (India localization).
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceService_ExportEWayBill_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceServiceExportEWayBill(payload);
correctionPurchaseInvoiceServiceGetApprovalTemplates
Retrieves the approval templates applicable to the given CorrectionPurchaseInvoice document payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | CorrectionPurchaseInvoiceService_GetApprovalTemplates_body | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->correctionPurchaseInvoiceServiceGetApprovalTemplates(payload);
Sample response:
{
"DocEntry": 12,
"DocNum": 12,
"CardCode": "V40000",
"DocDate": "2026-07-03"
}
correctionPurchaseInvoiceServiceHandleApprovalRequest
Handles an incoming approval request notification for the CorrectionPurchaseInvoice approval workflow.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->correctionPurchaseInvoiceServiceHandleApprovalRequest();
correctionPurchaseInvoiceServiceInitData
Initializes and returns default data used when creating a new CorrectionPurchaseInvoice document.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Document|error
Sample code:
Document result = check client->correctionPurchaseInvoiceServiceInitData();
Sample response:
{
"DocEntry": 0,
"DocDate": "2026-07-10",
"CardCode": "",
"DocCurrency": "USD"
}
LandedCostsCodes
listLandedCostsCodes
Retrieves a paged collection of LandedCostsCodes entities from the SAP Business One Service Layer, supporting OData query options for filtering, sorting, and paging.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | ListLandedCostsCodesHeaders | No | Headers to be sent with the request |
queries | ListLandedCostsCodesQueries | No | Query parameters ($skip, $top, $filter, $orderby, $expand, $inlinecount, $select) to be sent with the request |
Returns: LandedCostsCodesCollectionResponse|error
Sample code:
LandedCostsCodesCollectionResponse result = check client->listLandedCostsCodes();
Sample response:
{
"odata.metadata": "$metadata#LandedCostsCodes",
"value": [
{
"Code": "01",
"Name": "Freight",
"AllocationBy": "asCashValueBeforeCustoms",
"LandedCostsAllocationAccount": "_SYS00000001234"
}
],
"odata.nextLink": "LandedCostsCodes?$skip=20"
}
createLandedCostsCodes
Creates a new LandedCostsCode in SAP Business One from the given payload and returns the created entity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | LandedCostsCode | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: LandedCostsCode|error
Sample code:
LandedCostsCode result = check client->createLandedCostsCodes(payload);
Sample response:
{
"Code": "01",
"Name": "Freight",
"AllocationBy": "asCashValueBeforeCustoms",
"LandedCostsAllocationAccount": "_SYS00000001234"
}
getLandedCostsCodes
Retrieves a single LandedCostsCode identified by its Code key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetLandedCostsCodesQueries | No | Query parameters ($expand, $select) to be sent with the request |
Returns: LandedCostsCode|error
Sample code:
LandedCostsCode result = check client->getLandedCostsCodes("01");
Sample response:
{
"Code": "01",
"Name": "Freight",
"AllocationBy": "asCashValueBeforeCustoms",
"LandedCostsAllocationAccount": "_SYS00000001234"
}
deleteLandedCostsCodes
Deletes the LandedCostsCode identified by the given Code key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteLandedCostsCodes("01");
updateLandedCostsCodes
Partially updates the LandedCostsCode identified by Code using PATCH/MERGE semantics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Key property 'Code' (Edm.String) |
payload | LandedCostsCode | Yes | Request payload |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateLandedCostsCodes("01", payload);