Skip to main content

Lattice - Endpoint Payload Specification

Request-payload specification for every operation of the Lattice custom services in Dynamics 365 Finance and Operations, taken from the service classes and their data contracts. Sample values are USMF demo data.

Field names below match the [DataMember('...')] strings exactly (PascalCase). Sample values target the USMF legal entity.


0. Global conventions​

URL pattern​

POST {{baseUrl}}/api/services/{ServiceGroup}/{ServiceName}/{operationName}
  • Single op body envelope: { "_request": { ... } }
  • Batch op (...Batch, X++ (List _requests)) body envelope: { "_requests": [ { ... }, { ... } ] }
    • Each element of _requests is the same contract as the corresponding single op (e.g. confirmSalesOrderBatch takes a list of MGCLatticeSalesOrderConfirmRequestContract).
  • The request's LegalEntityId decides the company: every operation runs inside changecompany(LegalEntityId), so the calling user's default company does not matter.

Service group → service map (from the AxServiceGroup metadata)​

ServiceService group
MGCLatticeSalesOrderPostingServiceMGCLatticeAccountsReceivableServiceGroup
MGCLatticeSalesOrderCaptureServiceMGCLatticeAccountsReceivableServiceGroup
MGCLatticeFreeTextInvoiceServiceMGCLatticeAccountsReceivableServiceGroup
MGCLatticeSalesReturnServiceMGCLatticeAccountsReceivableServiceGroup
MGCLatticePriceInquiryServiceMGCLatticeAccountsReceivableServiceGroup
MGCLatticeSalesTradeAgreementServiceMGCLatticeAccountsReceivableServiceGroup
MGCLatticePurchaseOrderPostingServiceMGCLatticeAccountsPayableServiceGroup
MGCLatticePurchaseReturnServiceMGCLatticeAccountsPayableServiceGroup
MGCLatticeVendorInvoiceJournalServiceMGCLatticeAccountsPayableServiceGroup
MGCLatticeVendorInvoiceServiceMGCLatticeAccountsPayableServiceGroup
MGCLatticeVendorPaymentProposalServiceMGCLatticeAccountsPayableServiceGroup
MGCLatticePurchaseRequisitionServiceMGCLatticeAccountsPayableServiceGroup
MGCLatticeInventoryJournalPostingServiceMGCLatticeInventoryServiceGroup
MGCLatticeTransferOrderPostingServiceMGCLatticeInventoryServiceGroup
MGCLatticeInventoryCostServiceMGCLatticeInventoryServiceGroup
MGCLatticeProductionOrderPostingServiceMGCLatticeProductionServiceGroup
MGCLatticeGeneralLedgerJournalServiceMGCLatticeGeneralLedgerServiceGroup
MGCLatticePaymentJournalServiceMGCLatticeGeneralLedgerServiceGroup
MGCLatticeBudgetRegisterServiceMGCLatticeGeneralLedgerServiceGroup
MGCLatticeCurrencyRevaluationServiceMGCLatticeGeneralLedgerServiceGroup
MGCLatticeJournalPostingServiceMGCLatticeJournalPostingServiceGroup
MGCLatticeFixedAssetServiceMGCLatticeFixedAssetsServiceGroup
MGCLatticeProjectJournalServiceMGCLatticeProjectServiceGroup
MGCLatticeProjectInvoiceServiceMGCLatticeProjectServiceGroup
MGCLatticeExpenseReportServiceMGCLatticeExpenseServiceGroup
MGCLatticeWorkflowActionServiceMGCLatticeWorkflowServiceGroup
MGCLatticeAsyncOperationServiceMGCLatticeAsyncOperationServiceGroup
MGCLatticeDmfConfigServiceMGCLatticeDataManagementServiceGroup
MGCLatticeDmfMappingServiceMGCLatticeDataManagementServiceGroup
MGCLatticeDbAccessServiceMGCLatticeDbAccessServiceGroup

Common envelope fields (present on every request contract)​

Defined once here; referenced per-operation as "common envelope" instead of repeating.

JSON fieldX++ typerequired?sample valuenotes
CorrelationIdGuidoptional{{$guid}}Tracing only. Empty GUID allowed.
RequestIdGuidrequired{{$guid}}Idempotency key. validateCommonRequest rejects empty GUID. A RequestId belongs to the operation that first used it: only a repeat of the same operation replays the cached result; sending it to a different operation, of the same or another service, is refused with DuplicateRequest (not retryable) and the operation does not run.
LegalEntityIdDataAreaId (str)requiredUSMFThe company the operation runs in (changecompany). Must exist and be accessible; it need not be the caller's default company.
UserContextUserId (str)optionalAdminInformational caller identifier, recorded in the service call log. Never used for authorization: the operation runs with the rights of the authenticated caller. The workflow work-item actions name the user the action is taken as in ActingUserId (see MGCLatticeWorkflowActionService).
PreviewModebooleanoptionalfalseOn every write request. Operations with a preview validate and post nothing when it is true; every other operation refuses true with ErrorCode PreviewUnsupported before it reads or writes anything.

Mandatory minimum for any call to pass validateCommonRequest: RequestId (non-empty GUID) and LegalEntityId = USMF. These are implied in every "mandatory minimum" note below. The samples also send "UserContext": "Admin", which is optional.

Response. The posting and action operations answer with MGCLatticeOrderOperationResponseContract: DocumentId is the document the request acted on and PostedDocumentId the document the operation produced (posted confirmation, packing slip, invoice, journal, voucher or created order), replayed for a repeated RequestId. See API reference.

PostingDate defaulting​

Most posting ops accept PostingDate (X++ TransDate). When omitted/empty the base class effectivePostingDate() defaults it to the user's system date. So PostingDate is optional unless a back-dated/forward-dated posting is required. Sample value used throughout: 2026-05-19 (ISO date string).

Error classification (every operation)​

  • A request that fails its checks (missing or blank fields, empty or missing lines, invalid quantities or dates, unknown codes or accounts the caller supplied, contract rules) returns ValidationFailed, or a more specific code: DocumentNotFound, ConfigurationMissing, InvalidStatus, DimensionValueNotFound.
  • A failure of the business processing after the request is accepted, for example D365 refusing to create or post the document, returns BusinessRule, not retryable.
  • Runtime, deadlock and update-conflict failures return TransientRuntime, retryable.
  • Any other exception returns Operation <name> failed due to an unexpected error., classified UnexpectedError, not retryable; the RequestId is released so it can be retried.
  • Batch ops: an empty (null) entry in _requests fails as its own item with ValidationFailed and Request item N is empty. Every item in the request list must be a request.; the other items still run.

Line IsSelected​

Order-posting line contracts (Sales/Purchase/Transfer) carry IsSelected (boolean, default true). A line sent in Lines posts unless it says "IsSelected": false; a request whose lines are all unselected is refused with ValidationFailed, so a request with lines never posts the whole order.

Cross-reference key members (ExternalSystem / ...ExternalKey)​

The contracts below also carry optional cross-reference key members. ExternalSystem (MGCLatticeExternalSystemId, str) sits on the request header; each <Id>ExternalKey (MGCLatticeExternalKey, str) sits next to the id it replaces, and line keys use the header's ExternalSystem. The service resolves a key to the D365 id in the request's legal entity before its own lookups. Only alternate keys resolve; a key that matches no record or more than one, or names a different record than an id sent with it, fails the request as ValidationFailed. When a key is sent, the id it replaces may be omitted. Batch operations take the same members per item. Sample: "ExternalSystem": "SHOP", "SalesOrderIdExternalKey": "WEB-100245". See Cross-reference keys.

ContractHeader membersLine members
MGCLatticeSalesOrderConfirmRequestContract, ...PackingSlipRequestContract, ...InvoiceRequestContractExternalSystem, SalesOrderIdExternalKey-
MGCLatticeSalesPackingSlipCancelRequestContractExternalSystem, SalesOrderIdExternalKey(none)
MGCLatticeCreateSalesOrderRequestContract (MGCLatticeSalesOrderCaptureService.createSalesOrder)ExternalSystem, CustAccountExternalKeyMGCLatticeSalesOrderCaptureLineContract.ItemIdExternalKey
MGCLatticePriceInquiryRequestContractExternalSystem, CustAccountExternalKey, ItemIdExternalKey-
MGCLatticeSetSalesPriceRequest (setSalesPrice, setSalesPriceBatch)ExternalSystem, AccountRelationExternalKey (only with AccountCode = Table), ItemRelationExternalKey (only with ItemCode = Table)-
MGCLatticeFreeTextInvoicePostRequestContractExternalSystem, InvoiceAccountExternalKey-
MGCLatticeFreeTextInvoiceCancelRequestContractExternalSystem, InvoiceRecIdExternalKey-
MGCLatticeCreateSalesReturnRequestContractExternalSystem, CustAccountExternalKeyMGCLatticeReturnLineContract.ItemIdExternalKey
MGCLatticeCreatePurchaseReturnRequestContractExternalSystem, VendAccountExternalKeyMGCLatticeReturnLineContract.ItemIdExternalKey
MGCLatticeSalesReturnReceiveRequestContract, MGCLatticeSalesReturnCreditRequestContractExternalSystem, SalesOrderIdExternalKey (return order)-
MGCLatticePurchaseReturnShipRequestContract, MGCLatticePurchaseReturnCreditRequestContractExternalSystem, PurchaseOrderIdExternalKey-
MGCLatticePurchaseOrderConfirmRequestContract, ...PackingReceiptRequestContract, ...InvoiceRequestContractExternalSystem, PurchaseOrderIdExternalKey-
MGCLatticePurchaseProductReceiptCancelRequestContract, MGCLatticePurchasePrepaymentInvoiceRequestContractExternalSystem, PurchaseOrderIdExternalKey(none)
MGCLatticeVendorInvoiceJournalPostRequestContractExternalSystemMGCLatticeVendorInvoiceJournalLineContract.VendAccountExternalKey
MGCLatticePendingVendorInvoicePostRequestContractExternalSystem, VendorAccountExternalKey(none)
MGCLatticeVendorPaymentGenerationRequestContract (generateVendorPayments)ExternalSystem, JournalNumExternalKey(none)
MGCLatticePurchReqActionRequestContractExternalSystem, PurchReqIdExternalKey-
MGCLatticeInventJournalPostRequestContractExternalSystemMGCLatticeInventJournalLineContract.ItemIdExternalKey
MGCLatticeInventBOMJournalPostRequestContractExternalSystemMGCLatticeInventBOMJournalLineContract.ItemIdExternalKey, .BOMIdExternalKey
MGCLatticeInventTagJournalPostRequestContractExternalSystemMGCLatticeInventTagJournalLineContract.ItemIdExternalKey
MGCLatticeInventOwnershipJournalPostRequestContractExternalSystemMGCLatticeInventOwnershipJournalLineContract.ItemIdExternalKey, .VendAccountExternalKey
MGCLatticeTransferOrderShipRequestContract, MGCLatticeTransferOrderReceiveRequestContractExternalSystem, TransferOrderIdExternalKeyMGCLatticeTransferPostingLineContract.ItemIdExternalKey, .LineNumExternalKey (a line key also fills in the line's item)
MGCLatticeProductionOrderActionRequestContract, MGCLatticeProductionStartRequestContract, MGCLatticeProductionReportFinishedRequestContract, MGCLatticeProductionEndRequestContract, MGCLatticeProductionRouteCardPostRequestContractExternalSystem, ProdIdExternalKey-
MGCLatticeProductionPickListPostRequestContractExternalSystem, ProdIdExternalKeyMGCLatticeProductionPickListLineContract.ItemIdExternalKey
MGCLatticePaymentJournalPostRequestContractExternalSystemMGCLatticePaymentJournalLineContract.AccountNumExternalKey (customer or vendor, by operation), .SalesOrderIdExternalKey, .PurchaseOrderIdExternalKey
MGCLatticeSettlementRequestContractExternalSystem, AccountNumExternalKey (customer or vendor, by operation)-
MGCLatticePaymentReversalRequestContractExternalSystem, AccountNumExternalKey (customer or vendor, by operation)(none)
MGCLatticeJournalReversalRequestContractExternalSystem, JournalNumExternalKey(none)
MGCLatticeGeneralJournalPostRequestContract (postGeneralJournal, postIntercompanyJournal)ExternalSystemMGCLatticeGeneralJournalLineContract.AccountNumExternalKey, .OffsetAccountNumExternalKey (customer or vendor accounts only; an offset key resolves in the line's OffsetCompany)
MGCLatticeLedgerJournalPostingRequestContract (postLedgerJournal)ExternalSystem, JournalNumExternalKey(none)
MGCLatticeFixedAssetAcquisitionRequestContractExternalSystemMGCLatticeFixedAssetAcquisitionLineContract.AssetIdExternalKey
MGCLatticeFixedAssetDisposalRequestContractExternalSystem, AssetIdExternalKey-
MGCLatticeFixedAssetTransactionRequestContract (postAssetTransaction)ExternalSystemMGCLatticeFixedAssetTransactionLineContract.AssetIdExternalKey
MGCLatticeFixedAssetTransferRequestContract, MGCLatticeFixedAssetReversalRequestContract (transferAsset, reverseAssetTransaction)ExternalSystem, AssetIdExternalKey(none)
MGCLatticeFixedAssetSplitRequestContract (splitAsset)ExternalSystem, AssetIdExternalKey, ToAssetIdExternalKey(none)
MGCLatticeProjectJournalPostRequestContractExternalSystem, ProjIdExternalKeyMGCLatticeProjectJournalLineContract.ProjIdExternalKey, .ItemIdExternalKey
MGCLatticeProjectInvoiceProposalRequestContractExternalSystem, ProjIdExternalKey-
MGCLatticeStatusQueryRequestContract (sales, purchase, production, journal and workflow status)ExternalSystem, DocumentIdExternalKey (getWorkflowStatus: a purchase requisition's key)-

getAsyncOperationStatus, the workflow, async, budget, currency revaluation, pending price activation, item cost calculation, vendor payment proposal (generatePaymentProposal), depreciation, journal posting (postInventoryJournal, postProjectJournal, postProductionJournal, postTradeAgreementJournal), expense report, database access and DMF configuration contracts carry no key members.


ACCOUNTS RECEIVABLE​

MGCLatticeSalesOrderPostingService​

Group: MGCLatticeAccountsReceivableServiceGroup

Line contract: MGCLatticeSalesPostingLineContract​

JSON fieldX++ typerequired?samplenotes
LineNumLineNum (real)one of LineNum/ItemId1.0The order line to post. Preferred: it names the line directly.
ItemIdItemId (str)one of LineNum/ItemIdD0001Without LineNum, names the one line of this item (plus InventDimId) that still has a quantity to post; with LineNum, must match that line.
InventDimIdInventDimId (str)optional000001Inventory dimension combination id. Narrows an ItemId match; must match the line when sent with LineNum.
QtyQty (real)required10.0Quantity to post: greater than zero and no more than what is left to post on the line.
IsSelectedbooleanoptionaltrueDefault true; a line with false is skipped.

For Sales/Purchase posting ops, an omitted or empty Lines array posts the whole order (confirmPurchaseOrder takes no Lines at all). With Lines, only the selected lines post, each for its Qty; the other order lines are left as they were. All-unselected, empty, unknown, ambiguous (an ItemId that matches several lines) or duplicated lines, and a Qty that is not positive or exceeds the quantity left, are refused with ValidationFailed before anything posts. An operation that posts nothing fails. A request that names no order (SalesOrderId / PurchaseOrderId blank and no external key that resolves) is ValidationFailed.

Response: DocumentId = the order; PostedDocumentId = the posted confirmation / packing slip / product receipt / invoice number (replayed for a repeated RequestId). The three sales posting ops accept PreviewMode: true (validate only, nothing posts); cancelSalesPackingSlip and the purchase posting ops refuse it with PreviewUnsupported.

confirmSalesOrder (single) / confirmSalesOrderBatch (batch)​

  • Endpoint: MGCLatticeAccountsReceivableServiceGroup / MGCLatticeSalesOrderPostingService / confirmSalesOrder | confirmSalesOrderBatch
  • URL: POST {{baseUrl}}/api/services/MGCLatticeAccountsReceivableServiceGroup/MGCLatticeSalesOrderPostingService/confirmSalesOrder
  • Request contract: MGCLatticeSalesOrderConfirmRequestContract
JSON fieldX++ typerequired?samplenotes
common envelopereq/optsee §0
SalesOrderIdSalesId (str)requiredSO-000001Must reference an existing open sales order.
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeSalesPostingLineContractoptional[]Empty = confirm entire order. The confirmed lines keep their deliver-now quantities.
PreviewModebooleanoptionalfalsetrue validates without posting.

Mandatory minimum: envelope + SalesOrderId.

{ "_request": {
"CorrelationId": "{{$guid}}", "RequestId": "{{$guid}}",
"LegalEntityId": "USMF", "UserContext": "Admin",
"SalesOrderId": "SO-000001", "PostingDate": "2026-05-19",
"Lines": [ { "LineNum": 1.0, "ItemId": "D0001", "Qty": 10.0 } ]
} }

Batch envelope: { "_requests": [ { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "SalesOrderId": "SO-000001" } ] }

Data dependency: existing sales order SO-000001 in USMF.

postSalesPackingSlip (single) / postSalesPackingSlipBatch (batch)​

  • Request contract: MGCLatticeSalesOrderPackingSlipRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
SalesOrderIdSalesId (str)requiredSO-000001Must reference an existing sales order. The service does not require it to be confirmed first.
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeSalesPostingLineContractoptional[]Empty = everything not yet delivered.
PreviewModebooleanoptionalfalsetrue validates without posting.

The packing slip number comes from the number sequence and is returned as PostedDocumentId.

Mandatory minimum: envelope + SalesOrderId.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"SalesOrderId": "SO-000001", "PostingDate": "2026-05-19",
"Lines": [ { "LineNum": 1.0, "Qty": 5.0 } ] } }

Dependency: existing sales order with quantity left to deliver; the service does not check for a confirmation.

invoiceSalesOrder (single) / invoiceSalesOrderBatch (batch)​

  • Request contract: MGCLatticeSalesOrderInvoiceRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
SalesOrderIdSalesId (str)requiredSO-000001
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeSalesPostingLineContractoptional[]Empty = an order with packing slips is invoiced for the packing slip quantities not yet invoiced; an order without, for its ordered quantity.
PreviewModebooleanoptionalfalsetrue validates without posting.

The invoice number comes from the number sequence and is returned as PostedDocumentId.

Mandatory minimum: envelope + SalesOrderId.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"SalesOrderId": "SO-000001", "PostingDate": "2026-05-19", "Lines": [] } }

Dependency: packing slip typically posted first (depending on AR setup).

cancelSalesPackingSlip (single) / cancelSalesPackingSlipBatch (batch)​

  • Request contract: MGCLatticeSalesPackingSlipCancelRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
SalesOrderIdSalesId (str)requiredSO-000001Or SalesOrderIdExternalKey + ExternalSystem.
PackingSlipIdPackingSlipId (str)optionalPS-000001The packing slip to cancel. Empty = the order's only packing slip that can be canceled; when several can be canceled, it is required (ValidationFailed without it).
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Cancels the packing slip as Packing slip journal > Cancel does (the standard posting runs as a cancellation: delivery, inventory and ledger postings reversed; the packing slip is kept as a new version with zero quantities). Success only when the packing slip reads as canceled and every order line it delivered is open to deliver again; otherwise the cancellation is rolled back.

Response: DocumentId = the sales order; PostedDocumentId = the canceled packing slip number.

Refusals: no posted packing slip on the order, or a packing slip already canceled, invoiced (fully or in part) or not able to be canceled in the packing slip journal (drop shipment, open warehouse work, project item requirement, order type that cannot be corrected) = InvalidStatus; unknown order or a PackingSlipId not on the order = DocumentNotFound; several packing slips that can be canceled and no PackingSlipId, a packing slip number posted on several delivery dates, or a packing slip that also delivers other sales orders = ValidationFailed; a cancellation D365 refuses = BusinessRule.

Security: high-risk privilege MGCLatticeAccountsReceivablePackingSlipCancelMaintain (in MGCLatticeIntegrationServiceHighRiskDuty); not granted by MGCLatticeAccountsReceivableServiceMaintain.

Mandatory minimum: envelope + SalesOrderId.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"SalesOrderId": "SO-000001", "PackingSlipId": "PS-000001" } }

Dependency: a sales order with a posted packing slip that is not invoiced.

getSalesOrderStatus (single, query)​

  • Request contract: MGCLatticeStatusQueryRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
DocumentIdstrrequiredSO-000001The SalesId to query.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "DocumentId": "SO-000001" } }

MGCLatticeSalesOrderCaptureService​

Group: MGCLatticeAccountsReceivableServiceGroup

Line contract: MGCLatticeSalesOrderCaptureLineContract​

JSON fieldX++ typerequired?samplenotes
ItemIdItemId (str)requiredD0001
QtyQty (real)required5.0A line without a quantity (or with 0) is refused (ValidationFailed); a quantity is never defaulted.
UnitIdSalesUnit (str)optional-Empty = the item's sales unit.
UnitPriceSalesPrice (real)optional-0 = the trade agreement or default price.
SiteIdInventSiteId (str)optional1Ship-from site.
WarehouseIdInventLocationId (str)optional11Ship-from warehouse.
InventDimIdInventDimId (str)optional-A pre-resolved dimension; takes precedence over SiteId/WarehouseId.

createSalesOrder (single) / createSalesOrderBatch (batch)​

  • Request contract: MGCLatticeCreateSalesOrderRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
CustAccountCustAccount (str)requiredUS-001A customer that does not exist in the legal entity is DocumentNotFound.
CurrencyCodeCurrencyCode (str)optionalUSDEmpty = the customer's currency.
SalesOrderIdSalesId (str)optional-Empty = the number sequence assigns the order number.
CustomerRefCustRef (str)optionalPO-88231Customer reference on the header.
LinesList of MGCLatticeSalesOrderCaptureLineContractrequired (≥1)see above
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Mandatory minimum: envelope + CustAccount + 1 line (ItemId, Qty).

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"CustAccount": "US-001", "CustomerRef": "PO-88231",
"Lines": [ { "ItemId": "D0001", "Qty": 5.0, "SiteId": "1", "WarehouseId": "11" } ] } }

Behavior: creates a sales order (type Sales) through the standard header and line defaulting and validation; DocumentId = PostedDocumentId = the new sales order number. A repeat of the same RequestId returns that order instead of creating a second one.


MGCLatticeFreeTextInvoiceService​

Group: MGCLatticeAccountsReceivableServiceGroup

An empty (null) line, a line with neither AmountCur nor UnitPrice, and a line whose AmountCur is not Quantity x UnitPrice (to 0.01) are refused with ValidationFailed. PreviewMode = true is refused with PreviewUnsupported before anything is created.

Line contract: MGCLatticeFreeTextInvoiceLineContract​

JSON fieldX++ typerequired?samplenotes
DescriptionDescription (str)optionalConsulting servicesLine text.
MainAccountIdstroptional401100Revenue main account (USMF). When sent it must be in the legal entity's chart of accounts, otherwise DimensionValueNotFound.
AmountCurAmountCur (real)one of AmountCur/UnitPrice1000.00Line amount in the invoice currency. When 0 it is Quantity x UnitPrice; when both are sent it must equal Quantity x UnitPrice.
QuantityQty (real)optional1.0Defaults to 1.
UnitPriceInvoiceUnitPrice (real)one of AmountCur/UnitPrice1000.00When 0 it is AmountCur / Quantity.
SalesTaxGroupTaxGroup (str)optionalCACustomer sales-tax group (USMF).
ItemSalesTaxGroupTaxItemGroup (str)optionalFullItem sales-tax group (USMF).

postFreeTextInvoice (single) / postFreeTextInvoiceBatch (batch)​

  • Request contract: MGCLatticeFreeTextInvoicePostRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
InvoiceAccountCustAccount (str)requiredUS-001Customer to invoice.
CurrencyCodeCurrencyCode (str)optionalUSDDefaults from the customer.
PostingDateTransDateoptional2026-05-19
DueDateTransDateoptional2026-06-19
LinesList of MGCLatticeFreeTextInvoiceLineContractrequired (≥1)see aboveAt least one line needed.

Response: DocumentId and PostedDocumentId = the posted invoice number.

Mandatory minimum: envelope + InvoiceAccount + 1 line with AmountCur or UnitPrice; the sample also sends the line's Description and revenue MainAccountId.

{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"InvoiceAccount": "US-001", "CurrencyCode": "USD",
"PostingDate": "2026-05-19", "DueDate": "2026-06-19",
"Lines": [ { "Description": "Consulting services", "MainAccountId": "401100",
"AmountCur": 1000.00, "Quantity": 1.0, "UnitPrice": 1000.00 } ]
} }

Dependency: customer US-001; verify MainAccountId 401100 and tax groups exist in USMF.

cancelFreeTextInvoice (single) / cancelFreeTextInvoiceBatch (batch)​

  • Request contract: MGCLatticeFreeTextInvoiceCancelRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
InvoiceRecIdRecId (int64)one of RecId/InvoiceId5637145000RecId of the posted FTI (CustInvoiceTable). Wins if both provided.
InvoiceIdNum (str)one of RecId/InvoiceIdFTI-000001Natural key - the free-text invoice id. Resolves the RecId server-side; InvoiceRecId still takes precedence if also supplied.
CancelDateTransDateoptional2026-05-19
ReasonCodestrrequiredERRORFinancial reason (ReasonTable, customer-enabled). F&O will not save a correction without one; USMF has no CORR/CANCEL.
ReasonCommentstroptionalCancellation

Response: DocumentId = the canceled invoice; PostedDocumentId = the correcting invoice.

Mandatory minimum: envelope + one of InvoiceRecId / InvoiceId + ReasonCode.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"InvoiceRecId": 5637145000, "InvoiceId": "FTI-000001", "CancelDate": "2026-05-19", "ReasonCode": "ERROR" } }

Natural key: supply InvoiceId to have the service resolve the CustInvoiceTable RecId from the invoice id; the RecId remains a fallback (and wins if both are sent).

Dependency: InvoiceRecId is a RecId-only input - not creatable via OData; must be obtained from a posted free-text invoice in USMF. InvoiceId is the natural-key alternative when the posted FTI id is known.


MGCLatticeSalesReturnService​

Group: MGCLatticeAccountsReceivableServiceGroup

The receive and credit operations are header-only - their request contracts do not carry a Lines collection. createSalesReturn takes lines (MGCLatticeReturnLineContract). No return operation has a preview: PreviewMode: true is refused with PreviewUnsupported before anything runs. A missing order number (after any external key is resolved) fails with ValidationFailed naming the member. PostedDocumentId in the response is the document produced: the created return order, the return packing slip or the credit note number.

createSalesReturn / createSalesReturnBatch​

  • Request contract: MGCLatticeCreateSalesReturnRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
CustAccountCustAccount (str)requiredUS-001
ReturnReasonCodeIdReturnReasonCodeId (str)required21The header return reason; it applies to every line.
ReturnDeadlineReturnDeadline (date)optional2026-06-19
LinesList of MGCLatticeReturnLineContractrequired (≥1)see below
PreviewModebooleanoptionalfalsetrue is refused (PreviewUnsupported).

Line (MGCLatticeReturnLineContract, shared with createPurchaseReturn): ItemId (required), Qty (required: a missing or 0 quantity, or an empty line, fails the request with ValidationFailed before anything is created; stored negative), SiteId + WarehouseId or InventDimId, DispositionCode (sales only), ItemIdExternalKey.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"CustAccount": "US-001", "ReturnReasonCodeId": "21",
"Lines": [ { "ItemId": "D0001", "Qty": 1, "DispositionCode": "11" } ] } }

receiveSalesReturn / receiveSalesReturnBatch​

  • Request contract: MGCLatticeSalesReturnReceiveRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
SalesOrderIdSalesId (str)required001412Existing return order (sales order of type ReturnItem).
PostingDateTransDateoptional2026-05-19
DispositionCodeReturnDispositionCodeId (str)lines without one11Applied when the receive registers the lines (the return order's Registration step). Its action decides the flow: Credit (USMF 11) = receive into inventory, then credit note; CreditOnly (21) = no receipt; Scrap (61)... Lines that already carry a code keep it.
PreviewModebooleanoptionalfalsetrue is refused (PreviewUnsupported).

The receive performs the standard return flow: every open line still awaiting arrival is registered with its disposition code (InventTransWMS_Register, line → Registered), then the packing slip moves it to Received - the state creditSalesReturn requires. PostedDocumentId is the return packing slip number.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"SalesOrderId": "001412", "PostingDate": "2026-05-19", "DispositionCode": "11" } }

creditSalesReturn / creditSalesReturnBatch​

  • Request contract: MGCLatticeSalesReturnCreditRequestContract - SalesOrderId required, PostingDate optional, PreviewMode refused. PostedDocumentId is the credit note number.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "SalesOrderId": "SO-RET-0001", "PostingDate": "2026-05-19" } }

Flow: createSalesReturn → receiveSalesReturn → creditSalesReturn.


MGCLatticePriceInquiryService​

Group: MGCLatticeAccountsReceivableServiceGroup

resolveSalesPrice (single, read-only)​

  • Request contract: MGCLatticePriceInquiryRequestContract. It has no RequestId or UserContext (a read makes no idempotency claim); CorrelationId is echoed. Response: MGCLatticePriceInquiryResponseContract, with ErrorCode and Errors on failure (see API reference).
JSON fieldX++ typerequired?samplenotes
CorrelationIdGuidoptional{{$guid}}Echoed on the response.
LegalEntityIdDataAreaId (str)optionalUSMFThe company to price in; empty = the caller's current company.
CustAccountCustAccount (str)requiredUS-001Must exist in the company (DocumentNotFound).
ItemIdItemId (str)requiredD0001Must exist in the company (DocumentNotFound).
QtyQty (real)optional10.00 = 1.
PriceDateTransDateoptional2026-05-19Empty = today.
CurrencyCodeCurrencyCode (str)optionalUSDEmpty = the customer's currency.
UnitIdUnitOfMeasureSymbol (str)optional-Empty = the item's sales unit.
SiteIdInventSiteId (str)optional-Site, for site-specific agreements.
WarehouseIdInventLocationId (str)optional-Warehouse.
{ "_request": { "LegalEntityId": "USMF", "CustAccount": "US-001", "ItemId": "D0001", "Qty": 10.0, "PriceDate": "2026-05-19" } }

MGCLatticeSalesTradeAgreementService​

Group: MGCLatticeAccountsReceivableServiceGroup

setSalesPrice (single) / setSalesPriceBatch (batch)​

  • Request contract: MGCLatticeSetSalesPriceRequest (both; the batch takes a _requests list of it). It has no RequestId or UserContext (a repeated identical request answers outcome Unchanged); CorrelationId is echoed. Response: MGCLatticeSetSalesPriceResult (with ErrorCode and Errors on failure); setSalesPriceBatch returns MGCLatticeSetSalesPriceBatchResult (Success, TotalCount, SuccessCount, FailureCount, Message, Results), not the bulk response (see API reference). To read the effective price, use resolveSalesPrice.
JSON fieldX++ typerequired?samplenotes
CorrelationIdGuidoptional{{$guid}}Echoed on the result.
LegalEntityIdDataAreaId (str)optionalUSMFEmpty = the caller's current company.
AccountCodePriceDiscPartyCodeType (enum)required0Sent as a number: 0 Table (customer), 1 GroupId (price group), 2 All. The name is refused with HTTP 400.
AccountRelationCustVendAC (str)requiredUS-001Customer account or price group, per AccountCode. A customer (0) must exist.
ItemCodePriceDiscProductCodeType (enum)required0Sent as a number: 0 Table (item), 1 GroupId (item group), 2 All.
ItemRelationItemId (str)requiredD0001Item number or item group, per ItemCode. An item (0) must exist.
CurrencyCodeCurrencyCode (str)requiredUSD
UnitIdUnitOfMeasureSymbol (str)optional-Empty = the item's sales unit (item code 0).
FromQtyQty (real)optional0Quantity break "from".
UnitPricePrice (real)required42.50Unit price to set; must be greater than zero unless AllowZeroPrice is true; never negative.
AllowZeroPricebooleanoptionalfalsetrue to set a price of zero.
PriceUnitPriceUnit (real)optional1Price-per quantity basis.
FromDateTransDaterequired2026-06-01Not in the past; decides edit in place versus supersede.
ToDateTransDateoptional-Empty = open-ended.
FindNextbooleanoptionaltrueNeeded for the first price of a key: a key with no single open-ended price (or a FromDate before it) is a complex timeline, answered RejectedComplex (BusinessRule) unless FindNext is true, which creates the price (Created).
SiteId / WarehouseIdstroptional-Site / warehouse pricing dimensions.
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.
{ "_request": { "LegalEntityId": "USMF",
"AccountCode": 0, "AccountRelation": "US-001", "ItemCode": 0, "ItemRelation": "D0001",
"CurrencyCode": "USD", "UnitPrice": 42.50, "FromDate": "2026-06-01", "FindNext": true } }

ACCOUNTS PAYABLE​

MGCLatticePurchaseOrderPostingService​

Group: MGCLatticeAccountsPayableServiceGroup

Line contract: MGCLatticePurchPostingLineContract​

Same shape and rules as MGCLatticeSalesPostingLineContract: LineNum (real; the purchase line's line number), ItemId (str), InventDimId (str), Qty (real), IsSelected (bool, default true). Used by product receipt and invoice; confirmPurchaseOrder refuses Lines. Empty Lines posts the whole PO; with Lines, only the selected lines post, each for its Qty. An invoice of a PO that has product receipts is built from the receipts: Lines, if sent, must name every line with a received, uninvoiced quantity, each with exactly that quantity.

confirmPurchaseOrder / confirmPurchaseOrderBatch​

  • Request contract: MGCLatticePurchaseOrderConfirmRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
PurchaseOrderIdPurchId (str)requiredPO-000001
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticePurchPostingLineContractdo not send-A confirmation always covers the whole order; a request with lines is refused (ValidationFailed).
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

PostedDocumentId = the confirmation number.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"PurchaseOrderId": "PO-000001", "PostingDate": "2026-05-19" } }

postPurchasePackingSlip (product receipt) / postPurchasePackingSlipBatch​

  • Request contract: MGCLatticePurchaseOrderPackingReceiptRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
PurchaseOrderIdPurchId (str)requiredPO-000001
PackingSlipIdPackingSlipId (str)requiredGRN-000001Vendor product-receipt number; returned as PostedDocumentId.
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticePurchPostingLineContractoptional[]
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"PurchaseOrderId": "PO-000001", "PackingSlipId": "GRN-000001", "PostingDate": "2026-05-19", "Lines": [] } }

invoicePurchaseOrder / invoicePurchaseOrderBatch​

  • Request contract: MGCLatticePurchaseOrderInvoiceRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
PurchaseOrderIdPurchId (str)requiredPO-000001
InvoiceIdNum (str)requiredVINV-000001Vendor invoice number; missing = ValidationFailed. Returned as PostedDocumentId.
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticePurchPostingLineContractoptional[]
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"PurchaseOrderId": "PO-000001", "InvoiceId": "VINV-000001", "PostingDate": "2026-05-19", "Lines": [] } }

cancelPurchaseProductReceipt / cancelPurchaseProductReceiptBatch​

  • Request contract: MGCLatticePurchaseProductReceiptCancelRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
PurchaseOrderIdPurchId (str)requiredPO-000001A confirmed purchase order. Or PurchaseOrderIdExternalKey + ExternalSystem.
ProductReceiptIdPackingSlipId (str)optionalGRN-000001The product receipt to cancel. Empty = the order's only product receipt that can be canceled; when several can be canceled, it is required (ValidationFailed without it).
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Cancels the receipt as Product receipt journal > Cancel does (receipt, inventory and ledger postings reversed; the receipt is kept as a new version with zero quantities). Success only when the receipt reads as canceled and every order line it received is open to receive again; otherwise the cancellation is rolled back.

Response: DocumentId = the purchase order; PostedDocumentId = the canceled product receipt number.

Refusals: the order not confirmed, no product receipt on the order, or a receipt already canceled, invoiced (fully or in part), matched to a pending vendor invoice, linked to project item requirements or not able to be canceled in the product receipt journal (intercompany direct delivery, consignment order) = InvalidStatus; unknown order or a ProductReceiptId not on the order = DocumentNotFound; several receipts that can be canceled and no ProductReceiptId, a receipt number posted on several delivery dates, or a receipt that also receives other purchase orders = ValidationFailed; a cancellation D365 refuses = BusinessRule.

Security: high-risk privilege MGCLatticeAccountsPayableProductReceiptCancelMaintain (in MGCLatticeIntegrationServiceHighRiskDuty); not granted by MGCLatticeAccountsPayableServiceMaintain.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"PurchaseOrderId": "PO-000001", "ProductReceiptId": "GRN-000001" } }

Dependency: a confirmed purchase order with a posted product receipt that is not invoiced and not on a pending vendor invoice.

postPurchasePrepaymentInvoice / postPurchasePrepaymentInvoiceBatch​

  • Request contract: MGCLatticePurchasePrepaymentInvoiceRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
PurchaseOrderIdPurchId (str)requiredPO-000001An order of type Purchase order with no posted invoice. Or PurchaseOrderIdExternalKey + ExternalSystem.
VendorInvoiceNumberVendInvoiceId (str)requiredPP-0001The vendor's invoice number; becomes the posted invoice number (standard duplicate checks apply).
PrepaymentPercentPercent (real)one of percent/amount, when the order has no prepayment10Greater than 0, at most 100: percentage of the order total.
PrepaymentAmountAmountCur (real)one of percent/amount, when the order has no prepaymentGreater than 0, at most the order total: fixed amount in the order currency.
PrepaymentCategoryNameEcoResCategoryName (str)required when the order has no prepaymentTrainingProcurement category of the prepayment; must not be the category of an order line.
PrepaymentCategoryHierarchyNameEcoResCategoryHierarchyName (str)optionalOnly when the category name is in several procurement category hierarchies.
PrepaymentDescriptionPurchPrepayDescription (str)optionalDescription of a new prepayment.
InvoiceDateDocumentDateoptional2026-05-19Invoice date of the prepayment invoice.
PostingDateTransDateoptional2026-05-19
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Creates the order's prepayment from the request when the order has none (as Purchase > Prepayment does), then posts the amount still available to invoice as a vendor prepayment invoice (vendor advance) to the vendor and the Purchase prepayment inventory posting account, in one transaction (a failed posting leaves neither). On an order that already has a prepayment, send no prepayment members (or the same values): the existing prepayment is invoiced.

Response: DocumentId = the purchase order; PostedDocumentId = the voucher of the posted prepayment invoice; the message names the invoice number, amount, currency and voucher.

Refusals: missing VendorInvoiceNumber, both or neither of percent/amount (order without prepayment), a value not greater than 0, a percent above 100, an amount above the order total, a missing, unknown or ambiguous category, a category used on the order's lines, values that differ from the existing prepayment = ValidationFailed; unknown order = DocumentNotFound; an order not of type Purchase order, in review or finalized, intercompany, already invoiced, with a pending prepayment invoice or nothing left to prepay, or a vendor on hold for invoicing = InvalidStatus; posting definitions enabled in the general ledger parameters = ConfigurationMissing; a posting the standard refuses (duplicate vendor invoice number, no Purchase prepayment posting account) = BusinessRule.

Security: MGCLatticeAccountsPayableServiceMaintain (not high-risk).

Mandatory minimum: envelope + PurchaseOrderId + VendorInvoiceNumber, plus PrepaymentPercent or PrepaymentAmount and PrepaymentCategoryName for an order without a prepayment.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"PurchaseOrderId": "PO-000001", "VendorInvoiceNumber": "PP-0001",
"PrepaymentPercent": 10, "PrepaymentCategoryName": "Training", "PostingDate": "2026-05-19" } }

Dependency: a purchase order of type Purchase order with no invoice yet; a procurement category not used on its lines (USMF Training, hierarchy "Procurement - Office Supplies"); the Purchase prepayment account in the inventory posting setup (USMF: one rule for all items and vendors); posting definitions disabled.

There is no sales prepayment invoice operation. A customer prepayment is a customer payment journal line with IsPrepayment: true (see MGCLatticePaymentJournalService).

getPurchaseOrderStatus​

  • Request contract: MGCLatticeStatusQueryRequestContract - DocumentId = PurchId.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "DocumentId": "PO-000001" } }

Dependency: existing PO PO-000001 in USMF.


MGCLatticePurchaseReturnService​

Group: MGCLatticeAccountsPayableServiceGroup

The ship and credit operations are header-only. createPurchaseReturn takes lines (MGCLatticeReturnLineContract). No return operation has a preview: PreviewMode: true is refused with PreviewUnsupported before anything runs. A missing order number (after any external key is resolved) fails with ValidationFailed naming the member. PostedDocumentId in the response is the document produced: the created return order, the return packing slip or the credit note number.

createPurchaseReturn / createPurchaseReturnBatch​

  • Request contract: MGCLatticeCreatePurchaseReturnRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
VendAccountVendAccount (str)requiredUS-101
ReturnItemNumPurchReturnItemNum (str, 10)requiredRMA7788The vendor's RMA number; F&O does not save a return order without one.
ReturnReasonCodeIdReturnReasonCodeId (str)optional21
LinesList of MGCLatticeReturnLineContractrequired (≥1)see the sales return lineA purchase return ships out of the line's warehouse.
PreviewModebooleanoptionalfalsetrue is refused (PreviewUnsupported).

The standard PurchaseOrderHeadersV2 entity only covers ordinary purchase orders (it neither creates nor lists return orders), so createPurchaseReturn is the API way to create one.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"VendAccount": "US-101", "ReturnItemNum": "RMA7788",
"Lines": [ { "ItemId": "D0001", "Qty": 1, "SiteId": "1", "WarehouseId": "11" } ] } }

shipPurchaseReturn / shipPurchaseReturnBatch​

  • Request contract: MGCLatticePurchaseReturnShipRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
PurchaseOrderIdPurchId (str)required00001000Existing return PO (PurchaseType ReturnItem), confirmed (confirmPurchaseOrder); an unconfirmed one is refused.
PackingSlipIdPackingSlipId (str)requiredRS-00001000The return shipment number.
PostingDateTransDateoptional2026-05-19
PreviewModebooleanoptionalfalsetrue is refused (PreviewUnsupported).
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "PurchaseOrderId": "00001000", "PackingSlipId": "RS-00001000", "PostingDate": "2026-05-19" } }

creditPurchaseReturn / creditPurchaseReturnBatch​

  • Request contract: MGCLatticePurchaseReturnCreditRequestContract - PurchaseOrderId and InvoiceId (the vendor's credit note number) required, PostingDate optional, PreviewMode refused. After a return shipment the credit is built from the shipped quantity.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "PurchaseOrderId": "00001000", "InvoiceId": "RC-00001000", "PostingDate": "2026-05-19" } }

Flow: createPurchaseReturn → confirmPurchaseOrder → shipPurchaseReturn → creditPurchaseReturn.


MGCLatticeVendorInvoiceJournalService​

Group: MGCLatticeAccountsPayableServiceGroup

Both ops refuse an empty (null) line with ValidationFailed, before any journal is created. postInvoiceRegisterJournal also refuses a line whose VendAccount is not an existing vendor that way; an approval line with an unknown vendor finds no registered invoice and fails with DocumentNotFound. PreviewMode = true is refused with PreviewUnsupported. Success: DocumentId = PostedDocumentId = the journal number; the journal carries the request's Description. Register lines take the vendor's defaults as the journal page does: terms of payment, method of payment (and its bank transaction type), payment specification and id, cash discount (calculated on the line), bank account, the vendor's currency when CurrencyCode is empty, and - when DueDate is empty - the due date from the terms of payment (from InvoiceDate when sent, else the transaction date). An invoice posted outright through a vendor invoice journal is posted approved, so payment proposals and payment journals pick it up.

Line contract: MGCLatticeVendorInvoiceJournalLineContract​

JSON fieldX++ typerequired?samplenotes
VendAccountVendAccount (str)requiredUS-101
InvoiceIdInvoiceId (str)approval: requiredINV-000001Vendor invoice number. Required on an approval line (ValidationFailed without it).
AmountCurDebitrealone of debit/credit0.00Approval: optional; when given it must equal the registered amount.
AmountCurCreditrealone of debit/credit1000.00An invoice is a credit to the vendor.
CurrencyCodeCurrencyCode (str)optionalUSDDefaults to the vendor's currency.
DescriptionstroptionalVendor invoice
TransDateTransDateoptional2026-05-19
InvoiceDateTransDateoptional2026-05-19
DueDateTransDateoptional2026-06-19Defaults from the vendor's terms of payment.
OffsetMainAccountIdMainAccountNum (str)see notes601500Vendor invoice journal: the offset (expense) main account; it must allow manual entry (the AP control account is rejected). Invoice register: leave empty - F&O's default, the posting profile's pending-invoice account, applies. Approval: required, the expense account the invoice is approved to.
ApproverPersonnelNumberHcmPersonnelNumberId (str)optional000020"Approved by". Register: defaults to the worker of the calling user; one is required. Approval: overrides the approver inherited from the register.

postInvoiceRegisterJournal / postInvoiceRegisterJournalBatch​

  • Request contract: MGCLatticeVendorInvoiceJournalPostRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdLedgerJournalNameId (str)requiredAPInvRegEither an invoice register journal name (type PurchaseLedger, USMF APInvReg): posting parks the invoices in the vendor invoice pool for postInvoiceApprovalJournal. Or a vendor invoice journal name (type VendInvoiceRegister, USMF APInvoice): posts the invoices outright.
DescriptionDescription (str)optionalInvoice register journal test
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeVendorInvoiceJournalLineContractrequired (≥1)see above
{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "APInvReg", "Description": "Invoice register journal test", "PostingDate": "2026-05-19",
"Lines": [ { "VendAccount": "US-101", "InvoiceId": "INV-000001", "AmountCurCredit": 1000.00,
"CurrencyCode": "USD", "ApproverPersonnelNumber": "000020",
"InvoiceDate": "2026-05-19", "DueDate": "2026-06-19" } ]
} }

For an outright posting through APInvoice, add "OffsetMainAccountId": "601500" (the expense account).

postInvoiceApprovalJournal / postInvoiceApprovalJournalBatch​

  • Request contract: MGCLatticeVendorInvoiceJournalPostRequestContract (same as above); JournalNameId must be an Approval journal name (USMF APInvApp).
  • Each line names a registered invoice (VendAccount + InvoiceId, posted through an invoice register journal) and its expense account (OffsetMainAccountId, required). The service fetches the invoice from the vendor invoice pool into a new approval journal (what Find vouchers does in the client), adds the expense line for the registered amount and posts; DocumentId = the approval journal number.
  • Fails without posting when the invoice is unknown, was posted outright (never registered), is already approved, is held by another unposted approval journal, or the given amount differs from the registered one. If posting fails, the invoices go back to the pool.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "APInvApp", "Description": "Invoice approval journal test",
"Lines": [ { "VendAccount": "US-101", "InvoiceId": "INV-000001", "AmountCurCredit": 1000.00,
"CurrencyCode": "USD", "OffsetMainAccountId": "601500" } ] } }

Dependency: vendor US-101; USMF journal names APInvReg (PurchaseLedger), APInvApp (Approval) and APInvoice (VendInvoiceRegister); expense account 601500.


MGCLatticeVendorInvoiceService​

Group: MGCLatticeAccountsPayableServiceGroup

postPendingVendorInvoice / postPendingVendorInvoiceBatch​

  • Request contract: MGCLatticePendingVendorInvoicePostRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
HeaderReferenceTradeLineRefId (str)one way<VendorInvoiceHeaders.HeaderReference>The pending invoice's header reference (key of the VendorInvoiceHeaders entity).
VendorAccountVendAccount (str)other way, with InvoiceNumberUS-101The invoice's invoice account or vendor account. Or VendorAccountExternalKey + ExternalSystem.
InvoiceNumberVendInvoiceId (str)other way, with VendorAccountVINV-000042The vendor's invoice number (the pending invoice's Invoice field).
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Name the invoice by HeaderReference or by VendorAccount + InvoiceNumber, not both. Posts the saved pending invoice the way Pending vendor invoices > Post does (standard matching, invoice policies, approval workflow rule and posting checks), on its own posting and invoice date; completely or not at all (on a refusal the invoice stays pending).

Response: DocumentId = the vendor's invoice number; PostedDocumentId = the voucher of the posted vendor invoice. Posting warnings and information are in Warnings / InformationalMessages.

Refusals: no invoice named, named both ways, VendorAccount without InvoiceNumber or the reverse, unknown vendor or unresolvable vendor key, several pending invoices of the vendor with that number (the message lists their header references) = ValidationFailed; no pending invoice with that header reference or vendor and number = DocumentNotFound; already posted, open for editing or being posted in another session, in automated invoice processing, on hold, in the approval workflow, or a vendor invoice workflow applies and the invoice is not approved = InvalidStatus; a posting the standard refuses (matching discrepancies, invoice policies, closed period, duplicate invoice number, ...) = BusinessRule.

Security: MGCLatticeAccountsPayableServiceMaintain.

Mandatory minimum: envelope + HeaderReference, or envelope + VendorAccount + InvoiceNumber.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"VendorAccount": "US-101", "InvoiceNumber": "VINV-000042" } }
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"HeaderReference": "<VendorInvoiceHeaders.HeaderReference>" } }

Dependency: a pending vendor invoice created in D365 or through the standard VendorInvoiceHeaders + VendorInvoiceLines entities (plus InvoiceSubLinesV2 to match a purchase order line to its product receipts). A non-PO line needs a procurement category with an expense account (USMF ADVERTISING, account 601300); a PO invoice needs a confirmed order with its product receipt posted when the item uses three-way matching.


MGCLatticeVendorPaymentProposalService​

Group: MGCLatticeAccountsPayableServiceGroup

generatePaymentProposal / generatePaymentProposalBatch​

  • Request contract: MGCLatticeVendorPaymentProposalRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdLedgerJournalNameId (str)requiredVendPayVendor payment journal name (type Payment); another type is refused (ValidationFailed).
FromDueDateTransDateoptional2026-01-01Proposal due-date range start; empty = no lower bound. Later than ToDueDate is refused.
ToDueDateTransDateoptional2026-05-19Range end; defaults to today.
MethodOfPaymentstroptionalCHECKUSMF method of payment.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "VendPay", "FromDueDate": "2026-01-01", "ToDueDate": "2026-05-19", "MethodOfPayment": "CHECK" } }

Behavior: creates the payment journal, runs the standard vendor payment proposal (open, approved vendor transactions due in the window) and transfers it to the journal as payment lines; the journal is not posted. DocumentId = PostedDocumentId = the journal number; the message gives the payment line count. When nothing matches, the empty journal is deleted again (as the standard proposal's "avoid empty journals" does): the operation succeeds with an empty DocumentId and the message says so. A failure after the journal was created deletes it too while it has no lines. PreviewMode = true is refused with PreviewUnsupported. Dependency: open vendor invoices in the due-date window (for lines); VendPay journal and CHECK method must exist (an unknown method is DocumentNotFound).

generateVendorPayments / generateVendorPaymentsBatch​

  • Request contract: MGCLatticeVendorPaymentGenerationRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNumLedgerJournalId (str)required00698An open vendor payment journal (type Payment), for example the one generatePaymentProposal returned. Or JournalNumExternalKey + ExternalSystem. Another journal type = ValidationFailed; unknown = DocumentNotFound.
MethodOfPaymentPaymMode (str)optionalCHECKOnly the lines with this method. Empty = every line whose method needs generation before it can post (payment type Check, a check number demanded by the payment control, or payment status Sent demanded). Unknown = ValidationFailed.
BankAccountIdCompanyBankAccountId (str)optionalUSMF OPEROnly the lines that pay from this bank account; it must exist, be active and have a check layout.
PostAfterGeneratebooleanoptionaltruetrue posts the journal after the generation, in the same transaction (a failed posting uses no check). Default false.
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNum": "00698", "MethodOfPayment": "CHECK", "PostAfterGenerate": true } }

Behavior: the standard Generate payments of the vendor payment journal for check payments: each generated line (vendor lines with payment status None or Rejected, filtered as above) gets the next check number of its bank account's check layout as payment reference and payment status Sent, and the check is recorded in the bank account's checks with status Payment. The check document is not printed (print copies from F&O); methods that export a payment file or use an Electronic reporting format are refused. DocumentId = the journal; PostedDocumentId = the first payment voucher when posted, otherwise the first check number; the message lists every check number and InformationalMessages has one line per check.

Refusals: no JournalNum, not a vendor payment journal, unknown method of payment or bank account, inactive bank account, a line that pays from no bank account, a method that exports a payment file or uses Electronic reporting, a journal without lines or without a line to generate = ValidationFailed; unknown journal = DocumentNotFound; journal posted, blocked by the system or another user, not approved under workflow approval, or its payments already generated = InvalidStatus; method without export format, bank account without check layout, fixed check numbering without created checks left = ConfigurationMissing; the standard generation skipped a line or the posting failed = BusinessRule.

Security: MGCLatticeAccountsPayableServiceMaintain.

Dependency: an open VendPay journal with CHECK lines (for example from generatePaymentProposal); method CHECK (payment type Check, export format Check); bank account USMF OPER with a check layout.


MGCLatticePurchaseRequisitionService​

Group: MGCLatticeAccountsPayableServiceGroup

Both ops share one contract: MGCLatticePurchReqActionRequestContract. PreviewMode = true is refused with PreviewUnsupported. A requisition is approved through its workflow: submit it, then complete the approver's work item with approveWorkItem.

JSON fieldX++ typerequired?samplenotes
common envelope
PurchReqIdPurchReqId (str)requiredPR-000001Existing purchase requisition; a missing one is DocumentNotFound.
CommentstroptionalSubmitting purchase requisition for approvalSubmit only.

submitPurchaseRequisition / submitPurchaseRequisitionBatch​

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"PurchReqId": "PR-000001", "Comment": "Submitting purchase requisition for approval" } }

Submit runs the document checks of the requisition page's Submit: a draft with no workflow in progress (InvalidStatus), with lines, submitted by its preparer (the calling user must be mapped to the preparer worker) and passing the submission rules (BusinessRule), with an applicable PurchReqReview configuration (ConfigurationMissing). The requisition moves to In review together with the workflow activation; DocumentId = the requisition, and the message names the workflow instance.

convertPurchaseRequisitionToOrder / convertPurchaseRequisitionToOrderBatch​

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "PurchReqId": "PR-000001" } }

The requisition must be Approved (InvalidStatus otherwise). No lines left to convert is ValidationFailed; a conversion that creates no purchase order line is BusinessRule. With automatic purchase order creation in the purchasing policy, D365 releases the approved requisition itself (Closed), after which convert answers InvalidStatus. DocumentId = the requisition; PostedDocumentId = the first purchase order created; the message lists all of them.

Dependency: an existing PR PR-000001 in the correct state (submit: Draft; convert: Approved).


INVENTORY​

MGCLatticeInventoryJournalPostingService​

Group: MGCLatticeInventoryServiceGroup

The movement, adjustment, counting and transfer ops share one request contract: MGCLatticeInventJournalPostRequestContract. The BOM, tag counting and ownership change ops have their own contracts (below), and on them JournalNameId is optional (default: the inventory parameters' journal name for the type; no name and no default = ConfigurationMissing). For the first four, the service validates the JournalNameId's journal type matches the operation (Movement / Adjustment / Counting / Transfer), and every line must name an existing item (an empty line or unknown ItemId is ValidationFailed); DocumentId = PostedDocumentId = the journal number. Success is reported only when the journal is posted. No op has a preview: PreviewMode: true is refused with PreviewUnsupported. When the op fails after creating the journal, the unposted journal is deleted, so a retry with the same RequestId creates it again.

Line contract: MGCLatticeInventJournalLineContract​

JSON fieldX++ typerequired?samplenotes
ItemIdItemId (str)requiredD0001
InventDimIdInventDimId (str)optional000001Dimension combination.
QtyQty (real)required10.0
CostPriceCostPrice (real)optional50.00Movement/adjustment unit cost.
CostAmountCostAmount (real)optional500.00
ToInventDimIdInventDimId (str)transfer only000002Destination dim of a transfer journal line; copied to the line only when sent. The service does not validate it: a transfer line without a destination fails later, when D365 posts the journal (BusinessRule).

postMovementJournal / postMovementJournalBatch​

  • JournalNameId sample: IMov (must be a Movement-type journal name).
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdInventJournalNameId (str)requiredIMovType must = Movement.
DescriptionDescription (str)optionalMovement journal test
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeInventJournalLineContractrequired (≥1)see above
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.
{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "IMov", "Description": "Movement journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ItemId": "D0001", "InventDimId": "000001", "Qty": 10.0, "CostPrice": 50.00 } ]
} }

postAdjustmentJournal / postAdjustmentJournalBatch​

  • JournalNameId sample: IAdj (Adjustment type). Same line/body shape as movement.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "IAdj", "Description": "Adjustment journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ItemId": "D0001", "InventDimId": "000001", "Qty": 10.0, "CostPrice": 50.00 } ] } }

postCountingJournal / postCountingJournalBatch​

  • JournalNameId sample: ICnt (Counting type). Qty = the counted quantity; the line posts the difference between it and the on-hand quantity at the posting date.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "ICnt", "Description": "Counting journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ItemId": "D0001", "InventDimId": "000001", "Qty": 100.0 } ] } }

postTransferJournal / postTransferJournalBatch​

  • JournalNameId sample: ITrf (Transfer type). Send ToInventDimId (the destination) on every line; a missing one is not validated up front and fails at posting as BusinessRule.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "ITrf", "Description": "Transfer journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ItemId": "D0001", "InventDimId": "000001", "ToInventDimId": "000002", "Qty": 5.0 } ] } }

Dependency: item D0001; the four journal names must exist with the matching journal type in USMF (the service rejects a name whose type doesn't match the op). InventDimId/ToInventDimId are InventDim.inventDimId RecId-strings - see open questions.

postBOMJournal / postBOMJournalBatch​

  • Request contract: MGCLatticeInventBOMJournalPostRequestContract
  • Line contract: MGCLatticeInventBOMJournalLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdInventJournalNameId (str)optionalIBOMA BOM journal name; empty = the inventory parameters' BOM journal name (USMF IBOM). Unknown or another type = ValidationFailed.
DescriptionDescription (str)optionalBOM journal testDefault: the journal name's description.
PostingDateTransDateoptional2026-05-19The report-as-finished date; also selects the BOM version.
LinesList of MGCLatticeInventBOMJournalLineContractrequired (≥1)see belowOne line per BOM item.
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Line fields: ItemId (str, required, or ItemIdExternalKey; a stocked item that can be produced), Qty (real, required, > 0, inventory unit), InventDimId (str, receipt dimensions), SiteId / WarehouseId (str, receipt site and warehouse on top of InventDimId; a warehouse without a site takes its own site; open dimensions are the item's defaults for the site), BOMId (str, or BOMIdExternalKey; must be a BOM of the item; empty = the item's active BOM version for the date, quantity and site).

Each line is reported as finished by the standard Report as finished of the BOM journal (receipt line plus component issue lines, phantoms exploded, cost from the components), then the journal is posted. A journal that was created and could not be posted is deleted again.

Response: DocumentId = PostedDocumentId = the posted BOM journal; the message counts the item lines and the component lines.

Refusals: no lines, an empty line, unknown item, Qty <= 0, unknown dimensions / site / warehouse or a warehouse of another site, an item that cannot be produced or is not stocked, a BOMId that is not a BOM of the item, no active BOM version = ValidationFailed; Report as finished raised warnings (or a circular BOM) so the standard would not post, or the posting is refused (negative inventory, missing ledger accounts) = BusinessRule.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "IBOM", "Description": "BOM journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ItemId": "D0007", "Qty": 1.0, "SiteId": "1", "WarehouseId": "11" } ] } }

Dependency: USMF D0007 has an active, approved BOM (000081, site 1) with components M0023 and M0024 consumed from warehouse 11.

postTagCountingJournal / postTagCountingJournalBatch​

  • Request contract: MGCLatticeInventTagJournalPostRequestContract
  • Line contract: MGCLatticeInventTagJournalLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdInventJournalNameId (str)optionalITagA tag counting journal name; empty = the inventory parameters' tag counting journal name (USMF ITag).
DescriptionDescription (str)optionalTag counting test
PostingDateTransDateoptional2026-05-19The counting date: counted quantities are compared with on-hand at this date.
PostCountingJournalbooleanoptionalfalsetrue also posts the counting journal, in the same transaction as the tags. Default false: left open for review, as in the standard.
LinesList of MGCLatticeInventTagJournalLineContractrequired (≥1)see belowOne line per tag.
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Line fields: TagNumber (str, required, unique in the request without regard to case, at most 10 characters: a longer one is ValidationFailed, never shortened), TagStatus (InventJournalTagStatus enum, sent as an integer: 1 Used, 2 Voided, 3 Missing; empty/0 = Used), ItemId (str, or ItemIdExternalKey; required on a used tag, not allowed on a voided or missing one), Qty (real, counted quantity >= 0 in the inventory unit; used tags only), InventDimId, SiteId, WarehouseId (str, where the tag was counted).

Posting the tags creates a counting journal (named by the inventory parameters' counting journal name, USMF ICnt) with one line per item and counted dimensions, counted = the sum of the used tags; the journal counts by the dimensions the tags give.

Response: DocumentId = the posted tag counting journal; PostedDocumentId = the counting journal it created (empty when no tag counted an item); the message says whether that journal was posted or is open for review.

Refusals: no lines, an empty line, no TagNumber, a tag number too long or duplicated, a used tag without item, a voided/missing tag with item or quantity, unknown item, Qty < 0, unknown dimensions = ValidationFailed; no default counting journal name in the inventory parameters = ConfigurationMissing; a tag the standard refuses (stopped item) or a refused posting = BusinessRule.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "ITag", "PostingDate": "2026-05-19", "PostCountingJournal": false,
"Lines": [ { "TagNumber": "T-0001", "ItemId": "D0001", "Qty": 12.0, "SiteId": "1", "WarehouseId": "11" },
{ "TagNumber": "T-0002", "ItemId": "D0001", "Qty": 8.0, "SiteId": "1", "WarehouseId": "11" },
{ "TagNumber": "T-0003", "TagStatus": 2 } ] } }

Dependency: USMF journal names ITag (TagCounting) and ICnt (the parameters' counting journal name).

postOwnershipChangeJournal / postOwnershipChangeJournalBatch​

  • Request contract: MGCLatticeInventOwnershipJournalPostRequestContract
  • Line contract: MGCLatticeInventOwnershipJournalLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdInventJournalNameId (str)optionalIOwnerAn ownership change journal name; empty = the inventory parameters' one. USMF sets none, so send IOwner.
DescriptionDescription (str)optionalOwnership change test
PostingDateTransDateoptional2026-05-19Date of the ownership change; the purchase order is received on it.
LinesList of MGCLatticeInventOwnershipJournalLineContractrequired (≥1)see below
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Line fields: ItemId (str, required, or ItemIdExternalKey; must track the Owner dimension), Qty (real, required, > 0), VendAccount (str, or VendAccountExternalKey; the vendor that owns the stock now; required unless InventDimId carries the owner), InventDimId, SiteId, WarehouseId (str, dimensions of the vendor-owned stock; open dimensions are the item's defaults).

Posting moves the quantity from the vendor's owner to the legal entity without a financial impact and creates, confirms and receives a purchase order per vendor for it.

Response: DocumentId = the posted ownership change journal; PostedDocumentId = the purchase order the posting created (the first, when several vendors); the message lists every purchase order.

Refusals: consignment configuration key (ConsignmentInbound) off = ConfigurationMissing; no lines, an empty line, unknown item, Qty <= 0, an item without the Owner dimension, unknown dimensions, unknown vendor, a vendor without an inventory owner, VendAccount and InventDimId naming different owners, no owner, the legal entity as owner = ValidationFailed; a refused posting (not enough vendor-owned stock, purchase order not created) = BusinessRule.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "IOwner", "PostingDate": "2026-05-19",
"Lines": [ { "ItemId": "M9211CI", "Qty": 1.0, "VendAccount": "US-104", "SiteId": "5", "WarehouseId": "51" } ] } }

Dependency: consignment enabled; USMF M9211CI is consignment stock owned by vendor US-104 (owner id US-104) at site 5 / warehouse 51.

Security (all seven inventory journal ops and their batches): MGCLatticeInventoryServiceMaintain.


MGCLatticeTransferOrderPostingService​

Group: MGCLatticeInventoryServiceGroup

Line contract: MGCLatticeTransferPostingLineContract​

Same shape as the other order-posting line contracts: LineNum (real), ItemId (str), InventDimId (str), Qty (real), IsSelected (bool, default true), plus ItemIdExternalKey / LineNumExternalKey. Optional; empty Lines ships/receives the whole order. With Lines, only the selected lines post, each for its Qty: a selected line with Qty <= 0 and a request whose lines are all unselected are refused (ValidationFailed), so a request with lines never ships/receives the whole order.

Response: DocumentId = the transfer order; PostedDocumentId = the voucher of the shipment/receipt journal posted (replayed for a repeated RequestId). An update that posts no journal fails. A blank TransferOrderId (no resolving key) is ValidationFailed. No preview: PreviewMode: true is refused with PreviewUnsupported.

shipTransferOrder / shipTransferOrderBatch​

  • Request contract: MGCLatticeTransferOrderShipRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
TransferOrderIdInventTransferId (str)requiredTO-000001
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeTransferPostingLineContractoptional[]
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"TransferOrderId": "TO-000001", "PostingDate": "2026-05-19", "Lines": [] } }

receiveTransferOrder / receiveTransferOrderBatch​

  • Request contract: MGCLatticeTransferOrderReceiveRequestContract (same fields as ship).
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"TransferOrderId": "TO-000001", "PostingDate": "2026-05-19", "Lines": [] } }

Dependency: transfer order TO-000001 (USMF warehouses 11→13, item D0001); must be shipped before receive.


MGCLatticeInventoryCostService​

Group: MGCLatticeInventoryServiceGroup. activatePendingPrices and its batch take MGCLatticePendingPriceActivationRequestContract and are granted by the high-risk privilege MGCLatticeInventoryCostActivateMaintain (administrator role only). calculateItemCosts and its batch take MGCLatticeItemCostCalculationRequestContract and are granted by MGCLatticeInventoryCostCalculateMaintain (operations duty, not high-risk; see below).

Activates the pending item prices of a costing version (new standard costs), the API equivalent of Activate on the Costing versions page (Activate pending price(s) on an item's Item price page). Runs the standard InventItemPriceActivationJob in one transaction: every eligible pending price is activated or, if one fails, none is. Activating a standard cost revalues on-hand inventory and posts the revaluation to the general ledger. A pending price is eligible when it is the newest one of its item, price type and price dimensions, is dated today or earlier, and passes the standard activation checks; a standard costing version with a fixed From date (DefaultDate) requires its pending prices to carry that date (USMF version 10: 2018-01-01).

activatePendingPrices / activatePendingPricesBatch​

JSON fieldX++ typerequired?samplenotes
common envelope
CostingVersionIdCostingVersionId (str)required10Must exist in the legal entity (DocumentNotFound) and not be blocked for activation (InvalidStatus).
ActivateCostPricebooleanoptionaltrueWhen none of the three price-type flags is set, cost prices only are activated.
ActivatePurchasePricebooleanoptionalfalse
ActivateSalesPricebooleanoptionalfalse
ActivateCostCategoryPricesbooleanoptionalfalseAlso activates the version's pending routing cost category prices and cost sheet calculation factors. Whole-version only: with ItemIds the request is ValidationFailed.
SkipIfEqualPriceExistsbooleanoptionalfalseA pending price equal to the active one stays pending.
ItemIdsList of stroptional["M0001"]Limit to these items; empty/absent = every eligible pending price of the version. An unknown item is ValidationFailed.
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported before any other check.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"CostingVersionId": "10", "ActivateCostPrice": true, "ItemIds": [ "M0001" ] } }

Batch: { "_requests": [ { ... }, { ... } ] }, for example one item per legal entity or costing version; each item runs exactly as the single op (empty list → failed with no results; a null item → its own ValidationFailed result).

Response: DocumentId = the costing version; PostedDocumentId = the voucher of the on-hand inventory revaluation (empty when nothing on hand was revalued). Success messages: Activated N pending price(s) in costing version V: <items>., with On-hand inventory was revalued on voucher X. when a revaluation was posted; No item price was activated in costing version V: ... (still a success) when every eligible price equals the active one or only cost category prices and calculation factors were pending. Nothing eligible to activate (and ActivateCostCategoryPrices not set) is BusinessRule: Costing version V has no pending price dated <today> or earlier for the requested price types and items. Idempotent on RequestId. activatePendingPrices (not the batch op) can be queued with submitAsyncOperation (ServiceName MGCLatticeInventoryCostService, OperationName activatePendingPrices). Dependency: a pending cost price for the item in the version, dated with the version's fixed from date (USMF 10: 2018-01-01); create one with the standard InventItemPendingPricesV2 entity. M0001 (site 1) is a standard cost item with on-hand in USMF, so activating its new cost also posts a revaluation.

calculateItemCosts / calculateItemCostsBatch​

  • Request contract: MGCLatticeItemCostCalculationRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
CostingVersionIdCostingVersionId (str)required10Must exist (DocumentNotFound), not be blocked (InvalidStatus; blocking activation does not block calculation), not be a standard cost conversion version and allow cost prices (ValidationFailed).
SiteIdInventSiteId (str)required when the version has no site1The site the costs are calculated for. A version restricted to a site calculates for that site (send it or leave it empty; another site = ValidationFailed).
CalculationDateTransDateoptional2018-01-01Calculation date and from date of the pending prices. Empty = the version's fixed date, else today. A version with a fixed date accepts only that date (ValidationFailed).
ItemIdsList of stroptional["D0003"]Items to calculate; empty/absent = every item of the legal entity. An unknown item is ValidationFailed.
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported before any other check.

Runs the standard item cost calculation of Costing versions > Calculation with the version's settings (cost prices, and sales prices when the version allows them; profit setting, fallback principle, price models, rounding; single level for a standard costing version; the procurement modes the version calculates), and records each item's result as a pending cost price in the version, dated the calculation date (an existing pending price of the same item, site and date is overwritten). Nothing is activated, revalued or posted: activatePendingPrices makes the prices active. Like the standard it runs outside a transaction: each item is recorded on its own, and a failed item does not stop the others.

Response: DocumentId = the costing version; PostedDocumentId = the calculation number of the first calculated item in item number order. Success message: Calculated N pending price(s) in costing version V for site S on <date>: <items>. (the first 25 items, then how many more). Warnings = the calculation's warnings and the errors of items that could not be calculated.

Refusals: besides the member rules above, the calculation number sequence (BOM parameters) not set up = ConfigurationMissing; a run that recorded no pending price, or an item in ItemIds that got no pending cost price = BusinessRule (the prices calculated for the other items stay recorded; calling again recalculates them).

calculateItemCosts (not the batch op) can be queued with submitAsyncOperation (ServiceName MGCLatticeInventoryCostService, OperationName calculateItemCosts). Batch: one calculateItemCosts per item (empty list → failed with no results; a null item → its own ValidationFailed result).

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"CostingVersionId": "10", "SiteId": "1", "ItemIds": [ "D0003" ] } }

Dependency: USMF costing version 10 (standard, fixed date 2018-01-01, no site); D0003 has an active, approved BOM and route at site 1; the calculation number sequence must be set up.


PRODUCTION​

MGCLatticeProductionOrderPostingService​

Group: MGCLatticeProductionServiceGroup. All ops require an existing production order ProdId (e.g. P000001) in the appropriate state; a request without ProdId (or ProdIdExternalKey) is ValidationFailed, a missing order is DocumentNotFound. No op has a preview: PreviewMode: true is refused with PreviewUnsupported before anything runs. postPickList, postRouteCard and reportAsFinished return the posted production journal number in PostedDocumentId. When the production control parameters do not allow a status update (estimate, schedule, release, start, report as finished, end) from the order's current status, the op fails with InvalidStatus instead of reporting the skipped update as done. postPickList / postRouteCard report success only when their production journal is posted; a journal whose posting failed is deleted, so it does not block the order and a retry with the same RequestId creates it again. Pick list and route card lines are validated before the journal is created and are posted exactly as sent (no automatic report as finished or picking list from the production parameters).

startProductionOrder / startProductionOrderBatch​

  • Request contract: MGCLatticeProductionStartRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
ProdIdProdId (str)requiredP000001
PostingDateTransDateoptional2026-05-19
StartQtyQty (real)optional10.0Default: the quantity not started yet. The start applies the site's automatic BOM / route consumption parameters.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProdId": "P000001", "PostingDate": "2026-05-19", "StartQty": 10.0 } }

reportAsFinished / reportAsFinishedBatch​

  • Request contract: MGCLatticeProductionReportFinishedRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
ProdIdProdId (str)requiredP000001
PostingDateTransDateoptional2026-05-19
GoodQtyQty (real)optional10.0Quantity reported finished. A report without EndJob needs GoodQty or ErrorQty (ValidationFailed otherwise).
ErrorQtyQty (real)optional0.0Scrap.
EndJobbooleanoptionaltrueThe standard "End job". Default false = partial report (status and remaining quantity unchanged); true = the order becomes Reported as finished and its remaining quantity is cleared.
AcceptErrorbooleanoptionaltrueThe form's "Accept error", used with EndJob: end the job even when the route jobs / BOM lines are not reported as finished; false stops with "Job ... has not been reported as finished".
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProdId": "P000001", "PostingDate": "2026-05-19", "GoodQty": 10.0, "ErrorQty": 0.0, "EndJob": true, "AcceptError": true } }

endProductionOrder / endProductionOrderBatch​

  • Request contract: MGCLatticeProductionEndRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope + ProdId (required) + PostingDate (opt, the calculation date of the end)P000001
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "ProdId": "P000001", "PostingDate": "2026-05-19" } }

estimateProductionOrder / scheduleProductionOrder / releaseProductionOrder (+ Batch)​

  • Shared request contract: MGCLatticeProductionOrderActionRequestContract
  • Fields: common envelope + ProdId (required, P000001). The actions take no date.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "ProdId": "P000001" } }

(Identical body for estimate, schedule, release - only the operationName in the URL differs.)

postPickList / postPickListBatch​

  • Request contract: MGCLatticeProductionPickListPostRequestContract
  • Line contract: MGCLatticeProductionPickListLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
ProdIdProdId (str)requiredP000001
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeProductionPickListLineContractrequired (≥1)see belowA request without lines is refused (ValidationFailed).

Line fields: ItemId (str; required unless InventTransId is sent), Qty (real, > 0, in the BOM line's unit), InventDimId (str, must exist), InventTransId (str, optional: lot id of the production BOM line to consume against). Without InventTransId the line consumes against the order's only open BOM line for the item; no open line = a new BOM line (unplanned consumption); several open lines = ValidationFailed (send InventTransId).

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProdId": "P000001", "PostingDate": "2026-05-19",
"Lines": [ { "ItemId": "M0001", "Qty": 10.0, "InventDimId": "000001" } ] } }

postRouteCard / postRouteCardBatch​

  • Request contract: MGCLatticeProductionRouteCardPostRequestContract
  • Line contract: MGCLatticeProductionRouteCardLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
ProdIdProdId (str)requiredP000001
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeProductionRouteCardLineContractrequired (≥1)see below

Line fields: OprNum (int, 10, required, a primary operation on the order's route), Hours (real, 2.0, process hours), GoodQty (real, 10.0), ErrorQty (real, 0.0); a line needs hours or a quantity. Each line is defaulted as the route card form does (job type Process, resource, cost categories, executed percentage).

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProdId": "P000001", "PostingDate": "2026-05-19",
"Lines": [ { "OprNum": 10, "Hours": 2.0, "GoodQty": 10.0, "ErrorQty": 0.0 } ] } }

getProductionOrderStatus​

  • Request contract: MGCLatticeStatusQueryRequestContract - DocumentId = ProdId.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "DocumentId": "P000001" } }

Dependency: production order P000001. Each status operation runs the standard update, and the production control parameters decide whether it is allowed from the order's current status (InvalidStatus otherwise); release, start and report as finished run the earlier updates the order has not had yet themselves. Only endProductionOrder requires a status: Reported as finished (InvalidStatus otherwise). Pick/route lines reference real BOM items/operations.


GENERAL LEDGER​

MGCLatticeGeneralLedgerJournalService​

Group: MGCLatticeGeneralLedgerServiceGroup

A line names its accounts one of two ways: MainAccountId / OffsetMainAccountId (main accounts), or AccountType + AccountNum and OffsetAccountType + OffsetAccountNum (types sent as integers: 0 Ledger, 1 Customer, 2 Vendor, 6 Bank). Both styles on one line = ValidationFailed. An empty (null) line, a main-account line without CurrencyCode and a typed line without AccountNum are refused with ValidationFailed; postGeneralJournal also refuses a line with OffsetCompany (use postIntercompanyJournal). A journal of main-account lines posts in one voucher. A customer, vendor or bank line is filled the way the journal page fills it (currency, terms of payment, method of payment, sales tax group, the AR / AP parameters' posting profile, due date from the terms when the line has an InvoiceId); the values the line sends win. A typed line with an offset account is a voucher of its own; all other lines share one voucher. Unless the GL parameter Allow multiple transactions within one voucher is on, a voucher may hold only one customer or vendor transaction and one bank transaction: a request that breaks this is refused with BusinessRule before anything is created (not checked for a journal name that allocates vouchers at posting), so a bank-to-bank transfer is two bank lines against an interim main account. Success: DocumentId = PostedDocumentId = the journal number; the journal carries the request's Description. The lines carry transaction type General journal (as the general journal page sets them), so the posted journal can be reversed with reverseJournal or the standard Reverse. Both post ops support PreviewMode (validation only, including the accounts and setup records the lines name: nothing is created or posted). The call log and idempotency log record the operation as postGeneralJournal / postIntercompanyJournal.

Line contract: MGCLatticeGeneralJournalLineContract​

JSON fieldX++ typerequired?samplenotes
MainAccountIdstrrequired unless the line uses AccountType / AccountNum110110Account display string.
OffsetMainAccountIdstroptional200110Offset (or use balanced line pairs).
AccountTypeint (LedgerJournalACType)optional10 Ledger (default), 1 Customer, 2 Vendor, 6 Bank; any other value = ValidationFailed. Not with MainAccountId.
AccountNumstrwith AccountTypeUS-001Main account, customer, vendor or bank account id. Unknown customer / vendor / bank = ValidationFailed; unknown main account = DimensionValueNotFound.
AccountNumExternalKeyMGCLatticeExternalKey (str)optionalCRM-C-1001Customer or vendor key in the header's ExternalSystem, in place of AccountNum; on a main account or bank account = ValidationFailed.
OffsetAccountTypeint (LedgerJournalACType)optional0Same values. Not with OffsetMainAccountId.
OffsetAccountNumstrwith an offset type other than 0401100Empty = the line balances against the other lines of its voucher. On an intercompany line, an account in OffsetCompany.
OffsetAccountNumExternalKeyMGCLatticeExternalKey (str)optionalOffset customer or vendor key (resolved in OffsetCompany when sent).
AmountCurDebitrealone of debit/credit1000.00
AmountCurCreditrealone of debit/credit0.00
CurrencyCodeCurrencyCode (str)required on a main-account lineUSDA customer, vendor or bank line takes the account's currency.
DescriptionstroptionalLine 1
TransDateTransDateoptional2026-05-19
DimensionsList of MGCLatticeDimensionValueContractoptionalsee belowFinancial dimensions: merged into the main account of a ledger line, into the default dimensions of a customer, vendor or bank line.
OffsetCompanystroptionalUSRTIntercompany only - offset legal entity; refused by postGeneralJournal.
InvoiceIdInvoiceId (str)optionalINV-10045A customer or vendor line posts the invoice under it; the due date is calculated only when it is sent.
DocumentNumberDocumentNum (str)optionalDOC-778
DocumentDateDocumentDateoptional2026-05-19A vendor invoice line's due date is calculated from it.
DueDateDueDateoptional2026-06-18Customer or vendor line only (else ValidationFailed). Default: from the terms of payment.
PaymentTermsIdPaymTermId (str)optionalNet30Customer or vendor line only. Default: the account's terms.
PostingProfilePostingProfile (str)optionalGENCustomer or vendor line only. Default: the AR / AP parameters' posting profile.
SalesTaxGroupTaxGroup (str)optionalCADefault: the customer's or vendor's, or the main account's.
ItemSalesTaxGroupTaxItemGroup (str)optionalALLDefault: the ledger account's or the default item sales tax group (customer / vendor line: only with an invoice number).
MethodOfPaymentstroptionalCHECKCustomer or vendor line only. Default: the account's method of payment.
PaymentReferencePaymReference (str)optionalREF-1
BankTransactionTypeBankTransactionType (str)optional05Line with a bank account only (else ValidationFailed).

Unknown terms of payment, posting profile, method of payment, sales tax group, item sales tax group or bank transaction type = ValidationFailed (terms of payment, posting profile and method of payment are looked up in the company of the line's customer or vendor). An external key that does not resolve, or a key without ExternalSystem = ValidationFailed.

MGCLatticeDimensionValueContract: DimensionName (str, e.g. Department), DimensionValue (str, e.g. 024).

postGeneralJournal / postGeneralJournalBatch​

  • Request contract: MGCLatticeGeneralJournalPostRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdLedgerJournalNameId (str)requiredGenJrn
DescriptionDescription (str)optionalGeneral journal test
PostingDateTransDateoptional2026-05-19
ExternalSystemMGCLatticeExternalSystemId (str)when a line sends a keyCRMThe external system of the lines' AccountNumExternalKey / OffsetAccountNumExternalKey.
PreviewModebooleanoptionalfalsetrue validates the request without creating or posting anything.
LinesList of MGCLatticeGeneralJournalLineContractrequired (≥1, balanced)see above
{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "GenJrn", "Description": "General journal test", "PostingDate": "2026-05-19",
"Lines": [
{ "MainAccountId": "110110", "AmountCurDebit": 1000.00, "AmountCurCredit": 0.00, "CurrencyCode": "USD",
"Description": "Debit line",
"Dimensions": [ { "DimensionName": "Department", "DimensionValue": "024" } ] },
{ "MainAccountId": "200110", "AmountCurDebit": 0.00, "AmountCurCredit": 1000.00, "CurrencyCode": "USD",
"Description": "Credit line" }
]
} }

Customer invoice (defaults from US-001) and a vendor adjustment, each a voucher of its own:

{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "GenJrn", "Description": "Customer invoice and vendor adjustment", "PostingDate": "2026-05-19",
"Lines": [
{ "AccountType": 1, "AccountNum": "US-001", "OffsetAccountType": 0, "OffsetAccountNum": "401100",
"InvoiceId": "INV-10045", "AmountCurDebit": 1250.00, "Description": "Consulting" },
{ "AccountType": 2, "AccountNum": "US-101", "OffsetAccountType": 0, "OffsetAccountNum": "601500",
"InvoiceId": "ADJ-2026-07", "AmountCurCredit": 300.00, "Description": "Vendor adjustment" }
]
} }

Bank-to-bank transfer (two bank lines through the interim account 110180, bank transaction type 05):

{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "GenJrn", "Description": "Bank transfer", "PostingDate": "2026-05-19",
"Lines": [
{ "AccountType": 6, "AccountNum": "USMF OPER", "OffsetAccountType": 0, "OffsetAccountNum": "110180",
"AmountCurCredit": 5000.00, "BankTransactionType": "05" },
{ "AccountType": 6, "AccountNum": "USMF PAYRL", "OffsetAccountType": 0, "OffsetAccountNum": "110180",
"AmountCurDebit": 5000.00, "BankTransactionType": "05" }
]
} }

Refusals (both post ops): the line checks above = ValidationFailed; two customer or vendor transactions, or two bank transactions, in one voucher while the GL parameter is off (for example a single bank-to-bank line) = BusinessRule, before anything is created; a main account, offset main account or dimension value that does not resolve = DimensionValueNotFound; a posting the standard refuses = BusinessRule (the journal is deleted again).

postIntercompanyJournal / postIntercompanyJournalBatch​

  • Request contract: MGCLatticeGeneralJournalPostRequestContract (same), but use OffsetCompany on at least one line. The offset account (main account, or with OffsetAccountType a customer, vendor or bank account) is in that legal entity, which must exist (ValidationFailed) and have intercompany accounting set up with the request's legal entity.
  • JournalNameId sample: IntJrn.
{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "IntJrn", "Description": "Intercompany journal test", "PostingDate": "2026-05-19",
"Lines": [ { "MainAccountId": "110110", "AmountCurDebit": 1000.00, "AmountCurCredit": 0.00,
"CurrencyCode": "USD", "OffsetMainAccountId": "200110", "OffsetCompany": "USRT" } ]
} }

An expense in USMF against a vendor of USSI:

{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "IntJrn", "Description": "Intercompany vendor expense", "PostingDate": "2026-05-19",
"Lines": [ { "AccountType": 0, "AccountNum": "601500", "CurrencyCode": "USD", "AmountCurDebit": 400.00,
"OffsetAccountType": 2, "OffsetAccountNum": "US_SI_000006", "OffsetCompany": "USSI", "InvoiceId": "IC-2026-031" } ]
} }

reverseJournal / reverseJournalBatch​

  • Request contract: MGCLatticeJournalReversalRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNumLedgerJournalId (str)one of JournalNum / JournalNumExternalKey / Voucher00001The posted ledger journal (JournalNum, not the journal name). Or JournalNumExternalKey + ExternalSystem.
VoucherVoucher (str)optionalGNJL000001One voucher of the journal; alone, it names the journal that contains it (in several journals = ValidationFailed: send JournalNum). Empty = every voucher of the journal.
ReversalDateTransDateoptional2026-05-19Default today; not before a voucher's date (ValidationFailed).
ReasonCodeReasonCode (str)when the AR parameters demand oneERRORMust exist (ReasonTable). Required for customer vouchers when Reason code required for transaction reversal is set, and for customer bank payments when it is set for payment cancellation.
ReasonCommentReasonComment (str)optionalPosted twice
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

Each voucher is reversed by the standard engine the posted journal's Reverse chooses: general ledger only, posted with transaction type General journal, Allocation or Elimination → TransactionReversal_Ledger; a customer or vendor transaction not posted to a bank account → TransactionReversal_Cust / TransactionReversal_Vend; a customer payment posted to a bank account → payment cancellation (BankPaymCancel, which reverses its settlements). Every voucher is checked first, and all are reversed in one transaction (all or none).

Response: DocumentId = the reversed journal; PostedDocumentId = the reversal voucher of the journal's first voucher; the message lists every voucher > reversal voucher; the engines' messages are in InformationalMessages.

Refusals: no journal or voucher, unknown reason code, a reversal date before a voucher's date, a voucher in several journals, a required reason missing = ValidationFailed; unknown journal, a voucher in no journal or not in the named journal = DocumentNotFound; journal not posted, a voucher already reversed (or its reversal revoked) or a customer payment already canceled = InvalidStatus; a voucher not in the general ledger, a voucher no standard reversal covers (any other bank voucher, fixed asset or project transactions: Voucher %1 of journal %2 cannot be reversed by the standard journal reversal. It reverses general journal, allocation and elimination vouchers, customer and vendor transactions, and customer payments posted to a bank account; bank, fixed asset and project transactions are reversed in their own module.), a voucher with several customer payments posted to a bank account, a ledger transaction the standard reversal cannot reverse (posting type, journalized entry, closed year, intercompany account), a settled customer or vendor transaction, a posted journal without vouchers, or a refusal of the standard engine = BusinessRule; the reversal voucher / trace number sequence (or the customer closing voucher sequence for a payment cancellation) not set up = ConfigurationMissing.

Security: high-risk privilege MGCLatticeGeneralLedgerJournalReverseMaintain (in MGCLatticeIntegrationServiceHighRiskDuty); not granted by MGCLatticeGeneralLedgerServiceMaintain. reverseJournal (not the batch op) can be queued with submitAsyncOperation (ServiceName MGCLatticeGeneralLedgerJournalService, OperationName reverseJournal).

Mandatory minimum: envelope + JournalNum (or Voucher).

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNum": "00001", "ReversalDate": "2026-05-19", "ReasonCode": "ERROR", "ReasonComment": "Posted twice" } }

Dependency: a posted general journal (for example from postGeneralJournal); the general ledger parameters' number sequences Reversal voucher and Trace number; reason code ERROR (enabled for ledger, customer, vendor and bank in USMF).

getJournalStatus​

  • Request contract: MGCLatticeStatusQueryRequestContract - DocumentId = the ledger JournalNum (e.g. 00001), not the journal name.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "DocumentId": "00001" } }

Dependency: journal names GenJrn/IntJrn; main accounts 110110/200110; dimension Department/024; intercompany company USRT must be configured for IC.


MGCLatticePaymentJournalService​

Group: MGCLatticeGeneralLedgerServiceGroup

Line contract: MGCLatticePaymentJournalLineContract​

JSON fieldX++ typerequired?samplenotes
AccountNumstrrequiredUS-001 (cust) / US-101 (vend)Cust/vend account depending on op.
AmountCurDebitrealone of debit/credit0.00
AmountCurCreditrealone of debit/credit1000.00
CurrencyCodeCurrencyCode (str)optionalUSDDefaults to the customer's or vendor's currency.
BankAccountIdCompanyBankAccountId (str)optionalUSMF OPERThe bank account the payment is made from or received into (the line's offset, type Bank); must be an existing bank account. Empty uses the journal name's offset account.
MethodOfPaymentstroptionalCHECK
InvoiceIdInvoiceId (str)optionalCIV-000001Customer payments only: the invoice the payment pays, so settleCustomerTransactions can find the payment by PaymentInvoiceId. Refused on vendor payment lines.
DescriptionstroptionalPayment
TransDateTransDateoptional2026-05-19
IsPrepaymentbooleanoptionalfalsetrue = the line is a prepayment (the payment journal's Prepayment journal voucher).
SalesOrderIdSalesId (str)optionalSO-000001Customer lines only: the sales order the payment is marked against. Or SalesOrderIdExternalKey + header ExternalSystem. On a vendor line = ValidationFailed.
PurchaseOrderIdPurchId (str)optionalPO-000001Vendor lines only: the purchase order the payment is marked against. Or PurchaseOrderIdExternalKey + header ExternalSystem. On a customer line = ValidationFailed.

Prepayments and order marking (both payment ops). Every payment line is approved by the calling user when it is created, as the payment journal page does. A line with IsPrepayment: true posts with the prepayment posting profile of the AR / AP parameters ("Posting profile with prepayment journal voucher"; USMF PRE); without one the default posting profile is used and Warnings says so. When the parameters calculate sales tax on prepayments, the journal is created with Amounts include sales tax and the line takes the account's sales tax group and the default item sales tax group, as the payment journal does. A line with an order (prepayment or not) is checked before the journal is created: the order must exist and be invoiced to the line's account (ValidationFailed otherwise) and be neither invoiced nor canceled (InvalidStatus). After posting, the payment is marked against the order as the order's Settle transactions does (Marked transactions), so the order's invoice settles it; InformationalMessages names the order, and a payment that could not be marked is a warning (the payment is posted).

postCustomerPaymentJournal / postCustomerPaymentJournalBatch​

  • Request contract: MGCLatticePaymentJournalPostRequestContract; JournalNameId = CustPay; line AccountNum = customer.
  • Request checks (both payment ops): an empty line, an AccountNum that is not an existing customer (customer op) / vendor (vendor op), a BankAccountId that is not an existing bank account, or an InvoiceId on a vendor line is ValidationFailed, before the journal is created. PreviewMode = true is refused with PreviewUnsupported. Success: DocumentId = PostedDocumentId = the journal number; the journal carries the request's Description.
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdLedgerJournalNameId (str)requiredCustPay
DescriptionDescription (str)optionalCustomer payment journal test
PostingDateTransDateoptional2026-05-19
GeneratePaymentsbooleanoptionalfalseVendor payments only (true on postCustomerPaymentJournal = ValidationFailed): generate the checks of the lines that need them before posting; see postVendorPaymentJournal. Default false.
LinesList of MGCLatticePaymentJournalLineContractrequired (≥1)see above
{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "CustPay", "Description": "Customer payment journal test", "PostingDate": "2026-05-19",
"Lines": [ { "AccountNum": "US-001", "AmountCurDebit": 0.00, "AmountCurCredit": 1000.00,
"CurrencyCode": "USD", "BankAccountId": "USMF OPER", "MethodOfPayment": "CHECK" } ]
} }

Customer deposit (prepayment) marked against a sales order:

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "CustPay", "Description": "Customer deposit", "PostingDate": "2026-05-19",
"Lines": [ { "AccountNum": "US-001", "AmountCurCredit": 500.00, "CurrencyCode": "USD",
"BankAccountId": "USMF OPER", "IsPrepayment": true, "SalesOrderId": "SO-000001" } ] } }

postVendorPaymentJournal / postVendorPaymentJournalBatch​

  • Same contract; JournalNameId = VendPay; line AccountNum = US-101.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "VendPay", "Description": "Vendor payment journal test", "PostingDate": "2026-05-19",
"Lines": [ { "AccountNum": "US-101", "AmountCurDebit": 1000.00, "AmountCurCredit": 0.00, "CurrencyCode": "USD", "BankAccountId": "USMF OPER", "MethodOfPayment": "ELECTRONIC" } ] } }

GeneratePayments. Without it, a line whose method of payment needs Generate payments (USMF CHECK: payment type Check) fails at posting with the standard "Check number must be filled in" (BusinessRule) and the journal is deleted. With "GeneratePayments": true, those lines get their checks first, drawn on the line's BankAccountId with the next numbers of its check layout (the same engine as generateVendorPayments); generation and posting are one transaction. The message lists the check numbers; DocumentId = PostedDocumentId = the journal. Refused before anything is created: a line that needs generation without BankAccountId, or whose method exports a payment file or uses Electronic reporting = ValidationFailed; a method without export format, a bank account without check layout or without created checks left (fixed numbering) = ConfigurationMissing.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "VendPay", "Description": "Vendor check payment", "GeneratePayments": true,
"Lines": [ { "AccountNum": "US-101", "AmountCurDebit": 1000.00, "CurrencyCode": "USD", "BankAccountId": "USMF OPER", "MethodOfPayment": "CHECK" } ] } }

settleCustomerTransactions / settleCustomerTransactionsBatch​

  • Request contract: MGCLatticeSettlementRequestContract
  • Line contract: MGCLatticeSettlementLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
AccountNumstrrequiredUS-001Customer account.
PaymentTransRecIdint64one of the three5637144576RecId of the payment CustTrans; it must be a payment of AccountNum (otherwise DocumentNotFound). Wins over the natural keys.
PaymentVoucherVoucher (str)one of the threePAYM-000001Natural key - the voucher of the posted payment; used when PaymentTransRecId is not sent. The way to identify a vendor payment.
PaymentInvoiceIdstrone of the threeCIV-000001Natural key - the invoice number the payment carries (a customer payment posted with a line InvoiceId); used when neither PaymentTransRecId nor PaymentVoucher is sent.
LinesList of MGCLatticeSettlementLineContractrequired (≥1)see below

Settlement line: InvoiceTransRecId (int64, 5637144577) or InvoiceId (str, CIV-000001) - natural-key invoice id of the posted cust/vend transaction; resolves the RecId server-side, RecId wins if both sent. Either way the line must name a transaction of AccountNum that is not a payment (otherwise DocumentNotFound). Plus SettleAmountCur (real, 500.00; 0 = the whole open balance).

Response: DocumentId = the voucher of the settled payment; a settlement produces no document of its own, so PostedDocumentId is empty. PreviewMode = true is refused with PreviewUnsupported.

{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"AccountNum": "US-001", "PaymentVoucher": "PAYM-000001",
"Lines": [ { "InvoiceTransRecId": 5637144577, "InvoiceId": "CIV-000001", "SettleAmountCur": 500.00 } ]
} }

Natural key: request-level PaymentVoucher / PaymentInvoiceId and per-line InvoiceId let the service resolve the payment/invoice CustTrans/VendTrans RecIds from their document ids; the matching RecId remains a fallback and wins if both are provided.

settleVendorTransactions / settleVendorTransactionsBatch​

  • Same contract; AccountNum = US-101; RecIds reference VendTrans; natural keys PaymentVoucher (payment voucher) + line InvoiceId (vendor invoice id).
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"AccountNum": "US-101", "PaymentVoucher": "PAYM-000002",
"Lines": [ { "InvoiceTransRecId": 5637144579, "InvoiceId": "VIV-000001", "SettleAmountCur": 750.00 } ] } }

Dependency: PaymentTransRecId / InvoiceTransRecId are RecId-only inputs (CustTrans/VendTrans RecIds) - not creatable/discoverable via OData; obtain from posted transactions in USMF, or supply the natural keys (PaymentVoucher / PaymentInvoiceId / line InvoiceId) and let the service resolve them. Journal names CustPay/VendPay, method CHECK, bank account USMF OPER must exist.

reverseCustomerPayment / reverseVendorPayment (+ Batch)​

  • Shared request contract: MGCLatticePaymentReversalRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
AccountNumCustVendAC (str)requiredUS-001 (cust) / US-101 (vend)Customer (reverseCustomerPayment) or vendor (reverseVendorPayment). Or AccountNumExternalKey + ExternalSystem. Unknown = ValidationFailed.
VoucherVoucher (str)requiredPAYM-000001The payment voucher (a Payment-type transaction of the account); none on the account = DocumentNotFound.
ReversalDateTransDateoptional2026-05-19Default today; not before the payment date.
ReasonCodeReasonCode (str)when the parameters demand oneERRORMust exist. Required when AR "Reason code required" is set for transaction reversal or payment cancellation, or Cash and bank "Require reason for payment reversal" for checks.
ReasonCommentReasonComment (str)optionalWrong customer
ReversalJournalNameIdLedgerJournalNameId (str)optionalCheckRevCheck reversal under review only: a journal name of type Check reversal. Empty = the legal entity's only one (none = ConfigurationMissing; several = ValidationFailed). Unknown or another type = ValidationFailed.
PostReversalJournalbooleanoptionalfalseCheck reversal under review only: true posts the check reversal journal in the same request. Default false (left for review).
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.

The standard reversal that covers the payment is used: a payment made by check → check reversal (BankChequeCancel, the Checks page's Payment reversal); when the cash and bank parameters require check reversals to be reviewed ("Use review process for payment reversals"; USMF has it on), it creates a check reversal journal with the canceling line and the check becomes Pending cancellation, and the journal is left for review or, with PostReversalJournal, posted in the same request (which reverses the payment and its settlements and cancels the check); a customer payment posted to a bank account, not by check → payment cancellation (BankPaymCancel, which reopens the invoices it paid); a vendor payment posted to a bank account, not by check → refused (BusinessRule); a payment not posted to a bank account → transaction reversal (TransactionReversal_Cust / _Vend), a settled one refused (BusinessRule: unsettle first). One transaction.

Response: DocumentId = the reversed payment voucher; PostedDocumentId = the voucher of the cancellation or reversal, or the check reversal journal when it is left for review.

Refusals: no account or voucher, unknown customer / vendor / reason code, reversal date before the payment date, a required reason missing, a ReversalJournalNameId that is unknown or not a check reversal journal name, several check reversal journal names and none requested = ValidationFailed; no payment with that voucher on the account = DocumentNotFound; payment already canceled or reversed, check already reversed or pending reversal (a check reversal journal exists), check not in status Payment = InvalidStatus; the BusinessRule cases above, a customer bank payment that cannot be canceled (post-dated check, letter of credit), or a refusal of the standard engine = BusinessRule; the reversal number sequence (ledger reversal voucher / trace number, or the customer / vendor closing voucher) not set up, or for a check reversal under review no check reversal journal name, a journal name without voucher series, or no GL journal number sequence = ConfigurationMissing.

Security: high-risk privilege MGCLatticePaymentReverseMaintain (in MGCLatticeIntegrationServiceHighRiskDuty); not granted by MGCLatticeGeneralLedgerServiceMaintain.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"AccountNum": "US-001", "Voucher": "PAYM-000001", "ReversalDate": "2026-05-19", "ReasonCode": "ERROR" } }

(Same body for reverseVendorPayment, with a vendor account; only the operationName in the URL differs.) A vendor check reversed through a posted check reversal journal:

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"AccountNum": "US-101", "Voucher": "PAYM-000002", "ReversalDate": "2026-05-19",
"ReversalJournalNameId": "CheckRev", "PostReversalJournal": true } }

Dependency: a posted customer payment, for example from postCustomerPaymentJournal with a BankAccountId (canceled with BankPaymCancel); for a vendor payment, one posted without a bank account or by check (for example postVendorPaymentJournal with GeneratePayments); for a check under review, check reversal journal name CheckRev.


MGCLatticeBudgetRegisterService​

Group: MGCLatticeGeneralLedgerServiceGroup

Line contract: MGCLatticeBudgetEntryLineContract​

JSON fieldX++ typerequired?samplenotes
MainAccountIdstrrequired600110Budget account.
Amountrealrequired10000.00Not zero (ValidationFailed).
CurrencyCodeCurrencyCode (str)optionalUSDDefaults to the accounting currency.
TransDateTransDateoptional2026-05-19Budget line date; defaults to PostingDate.
CommentstroptionalQ2 budget allocation

postBudgetEntry / postBudgetEntryBatch​

  • Request contract: MGCLatticeBudgetEntryPostRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
BudgetTransactionCodestrrequiredOriginal budgetBudget transaction (reason) code.
BudgetModelIdstrrequiredFY2026Budget model.
PostingDateTransDateoptional2026-05-19Date of the entry; defaults to today in the user's time zone.
LinesList of MGCLatticeBudgetEntryLineContractrequired (≥1)see above
{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"BudgetTransactionCode": "Original budget", "BudgetModelId": "FY2026", "PostingDate": "2026-05-19",
"Lines": [ { "MainAccountId": "600110", "Amount": 10000.00, "CurrencyCode": "USD",
"TransDate": "2026-05-19", "Comment": "Q2 budget allocation" } ]
} }

postBudgetTransfer / postBudgetTransferBatch​

  • Request contract: MGCLatticeBudgetEntryPostRequestContract (same). Use a Transfer-type BudgetTransactionCode (USMF ExpTransfer) and two offsetting lines (from/to accounts).
{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"BudgetTransactionCode": "ExpTransfer", "BudgetModelId": "FY2026", "PostingDate": "2026-05-19",
"Lines": [
{ "MainAccountId": "600110", "Amount": -2000.00, "CurrencyCode": "USD", "Comment": "Transfer from operating" },
{ "MainAccountId": "600120", "Amount": 2000.00, "CurrencyCode": "USD", "Comment": "Transfer to capital" }
]
} }

Behavior: the entry is created as a draft and posted through the standard budget register post (budget balances, budget control, and ledger posting when the budget code requires it). Every line needs a MainAccountId that resolves (otherwise DimensionValueNotFound); postBudgetEntry needs an Original budget code and postBudgetTransfer a Transfer code (otherwise ValidationFailed); transfer lines must net to zero. Success only when the entry is Completed; DocumentId = PostedDocumentId = the entry number (BudgetTransactionHeader.TransactionNumber). If the post fails, the draft entry the request created is deleted (its number is released), so a retry creates a new entry. PreviewMode = true is refused with PreviewUnsupported. Dependency: budget model FY2026, transaction codes Original budget/ExpTransfer, budget-enabled main accounts must exist in USMF.


MGCLatticeCurrencyRevaluationService​

Group: MGCLatticeGeneralLedgerServiceGroup. All three ops share MGCLatticeCurrencyRevaluationRequestContract.

JSON fieldX++ typerequired?samplenotes
common envelope
RevaluationDateTransDateoptional2026-05-19As-of revaluation date; defaults to today.
FromDateTransDateledger only2026-01-01Ledger reval only (refused by the customer and vendor ops): range start; defaults to the start of the fiscal year of RevaluationDate (both dates must be in one fiscal year).
CurrencyCodestroptionalEURLimit to one currency; empty = all (ledger: every currency posted in the period).
MainAccountFromIdstrledger only110110Account range start (ledger reval; refused by the customer and vendor ops).
MainAccountToIdstrledger only900000Account range end (ledger reval; refused by the customer and vendor ops).

Ledger reval: settings the standard revaluation rejects fail with ValidationFailed; a period with no ledger transactions succeeds with a "nothing to revalue" message and posts nothing.

Response (all three): when the run posted exchange adjustments, DocumentId = PostedDocumentId = the adjustment voucher and the message names it (customer/vendor: with the number of adjusted transactions); when nothing needed an adjustment both are empty and the message says nothing was posted. PreviewMode = true is refused with PreviewUnsupported.

runCustomerRevaluation / runCustomerRevaluationBatch​

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"RevaluationDate": "2026-05-19", "CurrencyCode": "EUR" } }

runVendorRevaluation / runVendorRevaluationBatch​

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"RevaluationDate": "2026-05-19", "CurrencyCode": "EUR" } }

runLedgerRevaluation / runLedgerRevaluationBatch​

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"RevaluationDate": "2026-05-19", "FromDate": "2026-01-01", "CurrencyCode": "EUR",
"MainAccountFromId": "110110", "MainAccountToId": "900000" } }

Dependency: open foreign-currency (e.g. EUR) cust/vend/ledger balances in USMF for the revaluation to produce entries.


JOURNAL POSTING​

MGCLatticeJournalPostingService​

Group: MGCLatticeJournalPostingServiceGroup. Posts a journal that already exists in the legal entity (entered on its page, imported, or created through the standard journal entities) with the standard posting the journal page's Post runs; it posts completely or not at all and is never deleted. All five ops refuse PreviewMode = true with PreviewUnsupported, and all five (not the batch ops) can be queued with submitAsyncOperation.

Operation (+ ...Batch)Request contractJournal memberJournals
postLedgerJournalMGCLatticeLedgerJournalPostingRequestContractJournalNum (LedgerJournalId) or JournalNumExternalKey + ExternalSystemGeneral, customer payment, vendor payment, invoice register, vendor invoice, invoice approval, project expense (Cost) and fixed asset journals
postInventoryJournalMGCLatticeJournalPostingRequestContractJournalId (JournalId)Movement, profit/loss, counting, transfer, BOM, tag counting, ownership change, project item and fixed asset inventory journals
postProjectJournalMGCLatticeJournalPostingRequestContractJournalId (JournalId)Project hour and fee journals
postProductionJournalMGCLatticeJournalPostingRequestContractJournalId (JournalId)Picking list, route card, job card and report as finished journals
postTradeAgreementJournalMGCLatticeTradeAgreementJournalPostingRequestContractJournalNum (PriceDiscJournalNum)Trade agreement journals (sales and purchase prices and discounts)
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNumLedgerJournalId / PriceDiscJournalNum (str)required (postLedgerJournal, postTradeAgreementJournal)00512The journal number (journal batch number). On postLedgerJournal, or JournalNumExternalKey + ExternalSystem.
JournalIdJournalId (str)required (postInventoryJournal, postProjectJournal, postProductionJournal)00087The journal number.
PreviewModebooleanoptionalfalseNo preview: true is refused with PreviewUnsupported.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "JournalNum": "<LedgerJournalHeaders.JournalBatchNumber>" } }
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "JournalId": "<InventoryMovementJournalHeaders.JournalNumber>" } }
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "JournalNum": "<TradeAgreementJournalHeaders.JournalNumber>" } }

Response: DocumentId = the journal; PostedDocumentId = the first voucher (in voucher order) for a ledger journal, the journal for the others. The ledger message counts the vouchers and lists the first 25; a tag counting journal's message names the counting journal its posting created (left open for review).

Delegated rights. Besides MGCLatticeJournalPostingMaintain, the caller must hold every Lattice operation that would post the journal's content, or the request is AccessDenied naming all the missing operations. By journal type: general journal → postGeneralJournal; customer / vendor payment journal → postCustomerPaymentJournal / postVendorPaymentJournal; invoice register and vendor invoice journal → postInvoiceRegisterJournal; invoice approval journal → postInvoiceApprovalJournal; project expense journal → postExpenseJournal; inventory movement / profit-loss / counting / transfer / BOM / tag counting / ownership change → the matching MGCLatticeInventoryJournalPostingService op; project item journal → postItemJournal; fixed asset inventory journal → postAcquisition; project hour / fee → postHourJournal / postFeeJournal; picking list → postPickList, route card and job card → postRouteCard, report as finished → reportAsFinished; trade agreement journal → MGCLatticeSalesTradeAgreementService.setSalesPrice. In a ledger journal, also by line: an intercompany line → postIntercompanyJournal; a fixed asset line (every line of a fixed asset journal, which has no type operation of its own) → postAcquisition (Acquisition), postDisposal (Disposal - sale / scrap) or postAssetTransaction (any other type); a project line → postExpenseJournal. Customer, vendor and bank lines are covered by postGeneralJournal.

Refusals: no journal named, an unresolvable key, a journal type no Lattice op posts (allocation, elimination, periodic, budget, project beginning balance, ...; the message lists the supported types), a journal without lines = ValidationFailed; unknown journal = DocumentNotFound; missing delegated rights = AccessDenied; already posted, locked by the system or another user or a user group, private to another user, in use, in a workflow approval not yet approved, needing journal-name approval, or a project journal approval status not ready for posting = InvalidStatus; a refusal of the standard posting (also a ledger journal above the line limit posted outside batch: queue it async) = BusinessRule.

Security: MGCLatticeJournalPostingMaintain (in MGCLatticeIntegrationServiceOperationsDuty) plus the delegated rights above.

Dependency: an open journal of a supported type in USMF, for example GenJrn (general journal), IMov (movement), Hour (project hour), Pick (picking list of a started production order) or S_Price (sales price trade agreement journal), created through LedgerJournalHeaders + LedgerJournalLines, InventoryMovementJournalHeaders + InventoryMovementJournalEntriesV2, JournalTables + JournalTrans, ProductionPickingListJournalEntries, or TradeAgreementJournalHeaders + OpenSalesPriceJournalLines.


FIXED ASSETS​

MGCLatticeFixedAssetService​

Group: MGCLatticeFixedAssetsServiceGroup

postAcquisition / postAcquisitionBatch​

An empty (null) line is refused with ValidationFailed.

  • Request contract: MGCLatticeFixedAssetAcquisitionRequestContract
  • Line contract: MGCLatticeFixedAssetAcquisitionLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdLedgerJournalNameId (str)requiredFACurFixed-asset journal name.
DescriptionDescription (str)optionalFixed asset acquisition test
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeFixedAssetAcquisitionLineContractrequired (≥1)see below

Acquisition line: AssetId (str, COMP-000001), AssetBookId (str, 200_SLLR), AcquisitionAmount (real, 15000.00), CurrencyCode (str, USD), OffsetMainAccountId (str, 110110), Description (str). AssetId/AssetBookId/AcquisitionAmount (not zero) required; a line without AssetBookId or AcquisitionAmount is ValidationFailed before the journal is created. CurrencyCode defaults to the accounting currency. Success: DocumentId = PostedDocumentId = the journal number; the journal carries the request's Description. Each line posts to its own book only (not to the book's derived books, as a journal page line would): acquire a derived book with a line of its own. The same holds for postDisposal.

{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "FACur", "Description": "Fixed asset acquisition test", "PostingDate": "2026-05-19",
"Lines": [ { "AssetId": "COMP-000001", "AssetBookId": "200_SLLR", "AcquisitionAmount": 15000.00,
"CurrencyCode": "USD", "OffsetMainAccountId": "110110" } ]
} }

runDepreciationProposal / runDepreciationProposalBatch​

  • Request contract: MGCLatticeFixedAssetDepreciationRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdLedgerJournalNameId (str)requiredFACur
AssetBookIdstroptional200_SLLRLimit to one book; empty = all books.
DepreciationDateTransDateoptional2026-05-19
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "FACur", "AssetBookId": "200_SLLR", "DepreciationDate": "2026-05-19" } }

Behavior: runs the standard depreciation proposal into a new fixed asset journal (the journal name must be of type Fixed assets, otherwise ValidationFailed; an unknown book is DocumentNotFound); the journal is not posted. DocumentId = PostedDocumentId = the journal number; the message gives the proposed line count, or says nothing was due (the journal then has no lines).

postDisposal / postDisposalBatch​

  • Request contract: MGCLatticeFixedAssetDisposalRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdLedgerJournalNameId (str)requiredFACur
AssetIdstrrequiredCOMP-000001
AssetBookIdstrrequired200_SLLR
IsSalebooleanoptionaltruetrue = disposal-sale, false = disposal-scrap.
SaleAmountrealrequired if IsSale5000.00
OffsetMainAccountIdstroptional110110Offset main account for the sale proceeds; one that does not resolve fails with DimensionValueNotFound.
CurrencyCodeCurrencyCode (str)optionalUSDDefaults to the accounting currency.
DisposalDateTransDateoptional2026-05-19
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "FACur", "AssetId": "COMP-000001", "AssetBookId": "200_SLLR",
"IsSale": true, "SaleAmount": 5000.00, "CurrencyCode": "USD", "DisposalDate": "2026-05-19" } }

Behavior: a request without AssetBookId is ValidationFailed; success only when the journal is posted; DocumentId = PostedDocumentId = the disposal journal number. Every FA op refuses PreviewMode = true with PreviewUnsupported. Dependency: asset COMP-000001 with book 200_SLLR must exist (acquire before depreciate/dispose); USMF fixed asset journal name FACur. Security: postAcquisition, runDepreciationProposal, postAssetTransaction, transferAsset, splitAsset (+ batch) = MGCLatticeFixedAssetsServiceMaintain; postDisposal (+ batch) = high-risk MGCLatticeFixedAssetsDisposalMaintain; reverseAssetTransaction (+ batch) = high-risk MGCLatticeFixedAssetsReverseMaintain (both in MGCLatticeIntegrationServiceHighRiskDuty). Async (submitAsyncOperation): runDepreciationProposal, postAcquisition, postDisposal, postAssetTransaction.

postAssetTransaction / postAssetTransactionBatch​

  • Request contract: MGCLatticeFixedAssetTransactionRequestContract
  • Line contract: MGCLatticeFixedAssetTransactionLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
JournalNameIdLedgerJournalNameId (str)requiredFACurA fixed asset journal name (type Assets) with a voucher series, on the posting layer of every line's book.
DescriptionDescription (str)optionalDepreciation from the asset register
PostingDateTransDateoptional2026-05-19Default line date; defaults to today.
ExternalSystemMGCLatticeExternalSystemId (str)with a line keyFAREG
LinesList of MGCLatticeFixedAssetTransactionLineContractrequired (≥1)see belowEvery line is checked before the journal is created.
Line fieldX++ typerequired?samplenotes
AssetIdAssetId (str)requiredCOMP-000171Or AssetIdExternalKey. Unknown = ValidationFailed.
AssetBookIdAssetBookId (str)required200_SLLRMust be acquired (not acquired, sold or scrapped = InvalidStatus); another posting layer than the journal name = ValidationFailed.
TransactionTypestrrequiredDepreciationAcquisitionAdj, Depreciation, DepreciationAdj, Revaluation, WriteUpAdj, WriteDownAdj, ExtraordinaryDepreciation, BonusDepreciation (not case-sensitive; a name, not an integer). Acquisition / DisposalSale / DisposalScrap / anything else = ValidationFailed (use postAcquisition / postDisposal).
DebitAmountAmountCurDebit (real)one of the twoAccounting currency; increases the book's value.
CreditAmountAmountCurCredit (real)one of the two250.00Decreases the book's value (depreciation, write-down). Both, none or a negative amount = ValidationFailed.
TransactionDateTransDateoptional2026-05-19Defaults to PostingDate.
OffsetMainAccountIdMainAccountNum (str)optional110110Default: the posting profile's offset account; unresolved = DimensionValueNotFound.
DimensionsList of MGCLatticeDimensionValueContractoptionalDepartment/023Replace these dimensions of the book's dimensions on the line.
ConsumptionQuantityAssetConsumptionQty (real)optionalDepreciation of a book that depreciates by consumption.
ReasonCodeReasonCode (str)when the FA parameters demand oneFA-IMPAIRUnknown = ValidationFailed.
ReasonCommentReasonComment (str)optional
DescriptionLedgerJournalTransTxt (str)optionalDefaults to the standard fixed asset text.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"JournalNameId": "FACur", "PostingDate": "2026-05-19",
"Lines": [ { "AssetId": "COMP-000001", "AssetBookId": "200_SLLR", "TransactionType": "Depreciation", "CreditAmount": 250.00 },
{ "AssetId": "COMP-000001", "AssetBookId": "200_SLLR", "TransactionType": "WriteUpAdj", "DebitAmount": 200.00 } ] } }

Behavior: creates the lines with the standard fixed asset journal line logic (asset as account, the book's posting profile offset, the book's dimensions, standard text and voucher; derived books take the transaction except a derived book that is not acquired) and posts the journal; a journal that does not post is deleted. DocumentId = the journal; PostedDocumentId = the voucher of its first line; the message lists every voucher. A depreciation type on a book that does not depreciate, or a posting the standard refuses = BusinessRule; a posting profile without the account or offset account of the type for the book (for example no bonus depreciation accounts), a journal name without voucher series = ConfigurationMissing.

transferAsset / transferAssetBatch​

  • Request contract: MGCLatticeFixedAssetTransferRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
AssetIdAssetId (str)requiredCOMP-000001Or AssetIdExternalKey + ExternalSystem. Unknown = DocumentNotFound.
AssetBookIdAssetBookId (str)optional200_SLLRThe one book to transfer; empty = every open or closed book with a posting layer.
DimensionsList of MGCLatticeDimensionValueContractone of Dimensions / LocationIdDepartment/023Replace these dimensions of each book's dimensions; unresolved = DimensionValueNotFound.
LocationIdAssetLocationId (str)one of Dimensions / LocationIdPRODThe asset's new location; unknown = ValidationFailed.
TransferDateTransDateoptional2026-05-19Defaults to today; outside the fiscal calendar = BusinessRule.
CommentTransferComment (str)optionalMoved to productionWritten to the transfer history and transactions.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"AssetId": "COMP-000001", "Dimensions": [ { "DimensionName": "Department", "DimensionValue": "023" } ], "LocationId": "PROD" } }

Behavior: the standard asset transfer (the fixed asset page's Transfer asset): per changed book a general ledger voucher moving the balance to the new dimensions, an asset transfer transaction and the transfer history; the location is set on the asset. One transaction. DocumentId = the asset; PostedDocumentId = the first book's transfer voucher (empty for a location-only move). Nothing to change = ValidationFailed; a book not open or closed = InvalidStatus; a book without transactions to move, a public sector transfer between balancing dimensions = BusinessRule; no transfer number sequence = ConfigurationMissing.

splitAsset / splitAssetBatch​

  • Request contract: MGCLatticeFixedAssetSplitRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
AssetIdAssetId (str)requiredCOMP-000001Or AssetIdExternalKey. Unknown = DocumentNotFound.
AssetBookIdAssetBookId (str)required200_SLLRMust be acquired (else InvalidStatus).
ToAssetIdAssetId (str)optionalExisting receiving asset (or ToAssetIdExternalKey); empty = a new asset copied from the asset (needs automatic numbering in its group, else ConfigurationMissing). The asset itself = ValidationFailed.
ToAssetBookIdAssetBookId (str)optionalDefaults to AssetBookId.
PercentPercent (real)one of Percent / QuantityGreater than 0, at most 100; moves values only.
QuantityAssetQuantity (real)one of Percent / Quantity4At most the asset's quantity; moves the quantity too.
SplitDateTransDateoptional2026-05-19Defaults to today.
JournalNameIdLedgerJournalNameId (str)requiredFACurFixed asset journal name on the books' posting layer.
ExternalSystemMGCLatticeExternalSystemId (str)with a key
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"AssetId": "COMP-000001", "AssetBookId": "200_SLLR", "Quantity": 4, "JournalNameId": "FACur" } }

Behavior: the standard asset split (the book's Split asset) and the posting of its split journal, in one transaction (nothing is kept when the journal does not post). DocumentId = the asset split; PostedDocumentId = the receiving asset (new or existing); the message names the split journal. Refusals per the table, plus a split or posting the standard refuses = BusinessRule.

reverseAssetTransaction / reverseAssetTransactionBatch​

  • Request contract: MGCLatticeFixedAssetReversalRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
AssetIdAssetId (str)requiredCOMP-000001Or AssetIdExternalKey + ExternalSystem. Unknown = ValidationFailed.
AssetBookIdAssetBookId (str)required200_SLLR
VoucherVoucher (str)required<LatticeFixedAssetTransactions.Voucher>No transaction of the book with it = DocumentNotFound.
TransactionDateTransDateoptionalOnly when the voucher has transactions of the book on several dates (else ValidationFailed).
ReversalDateTransDateoptional2026-05-19Defaults to today; not before the transaction (ValidationFailed).
ReasonCodeReasonCode (str)optionalERRORUnknown = ValidationFailed.
ReasonCommentReasonComment (str)optional
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"AssetId": "COMP-000001", "AssetBookId": "200_SLLR", "Voucher": "<LatticeFixedAssetTransactions.Voucher>", "ReasonCode": "ERROR" } }

Behavior: the standard fixed asset transaction reversal (the asset transactions page's Reverse transaction), in one transaction. DocumentId = the reversed voucher; PostedDocumentId = the reversal voucher. Already reversed, or itself a reversal = InvalidStatus; a voucher with a vendor or customer transaction (reverse it in AP / AR), a later depreciation or transfer, a negative net book value, a closed period = BusinessRule; no reversal voucher or trace number sequence = ConfigurationMissing. High-risk (MGCLatticeFixedAssetsReverseMaintain).


PROJECT​

MGCLatticeProjectJournalService​

Group: MGCLatticeProjectServiceGroup. All four ops share MGCLatticeProjectJournalPostRequestContract + line MGCLatticeProjectJournalLineContract. The JournalNameId and which line fields matter vary by journal type - and so does the journal table: hour and fee journals are project journals (ProjJournalName of type Hour / Revenue), an expense journal is a ledger journal of type Cost (USMF PrjJrn) and an item journal is an inventory journal of type Project (USMF ProjItem). ProjJournalType has no expense or item member, so a project journal name is never valid for those two ops; the service gates on the journal type and the line's category type (Hour / Cost / Item / Revenue).

Line contract: MGCLatticeProjectJournalLineContract​

JSON fieldX++ typerequired?samplenotes
ProjIdProjId (str)optional000184Project id (InProcess). Empty = the header ProjId; the resolved project must exist (DocumentNotFound otherwise).
CategoryIdstrrequiredJourneyman/Travel/ProjItem/SetupProject category of the op's type (Hour / Cost / Item / Revenue).
Qtyrealhour/item2.0Hours or item qty (expense: multiplies CostPrice, default 1).
CostPricerealoptional50.00Expense: the amount per Qty.
SalesPricerealoptional100.00
CurrencyCodeCurrencyCode (str)optionalUSD
DescriptionstroptionalConsulting
TransDateTransDateoptional2026-05-19
WorkerPersonnelNumberHcmPersonnelNumberId (str)hour journal000001Personnel number of the worker (the line's resource); an unknown number is ValidationFailed.
ItemIdItemId (str)item journalD0001
InventDimIdInventDimId (str)item journal, optional000031Dimension the item is consumed from; empty = the item's default order settings.
LinePropertyIdProjLinePropertyId (str)optionalBillableEmpty = the project line property setup default.
OffsetMainAccountIdMainAccountNum (str)expense journal110180Main account the expense is paid from (credit side).
ActivityNumberstroptionalACT-001Project activity.

Header (all four ops)​

JSON fieldX++ typerequired?samplenotes
common envelope
ProjIdProjId (str)optional000184Header project: the default for lines without their own ProjId.
JournalNameIdstrrequired(per type)
DescriptionDescription (str)optional
PostingDateTransDateoptional2026-05-19
LinesList of MGCLatticeProjectJournalLineContractrequired (≥1)

postHourJournal / postHourJournalBatch - JournalNameId = Hour (project journal, type Hour), line CategoryId = an Hour category (USMF Journeyman), WorkerPersonnelNumber set​

{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProjId": "000184", "JournalNameId": "Hour", "Description": "Hour journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ProjId": "000184", "CategoryId": "Journeyman", "Qty": 2.0, "WorkerPersonnelNumber": "000007",
"CostPrice": 50.00, "SalesPrice": 100.00, "CurrencyCode": "USD" } ]
} }

postExpenseJournal / postExpenseJournalBatch - JournalNameId = a ledger journal name of type Cost (USMF PrjJrn), CategoryId = a Cost category (Travel), OffsetMainAccountId set​

The line debits the project (its ledger account comes from the project group / category posting setup) and credits OffsetMainAccountId for Qty × CostPrice.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProjId": "000184", "JournalNameId": "PrjJrn", "Description": "Expense journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ProjId": "000184", "CategoryId": "Travel", "Qty": 1.0, "CostPrice": 250.00, "SalesPrice": 250.00, "CurrencyCode": "USD", "OffsetMainAccountId": "110180" } ] } }

postItemJournal / postItemJournalBatch - JournalNameId = an inventory journal name of type Project (USMF ProjItem), CategoryId = an Item category (ProjItem), ItemId set​

The line issues Qty of ItemId from InventDimId (or the item's default order settings) onto the project.

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProjId": "000184", "JournalNameId": "ProjItem", "Description": "Item journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ProjId": "000184", "CategoryId": "ProjItem", "ItemId": "D0001", "InventDimId": "000031", "Qty": 2.0, "CostPrice": 50.00, "SalesPrice": 75.00, "CurrencyCode": "USD" } ] } }

postFeeJournal / postFeeJournalBatch - JournalNameId = Fee (project journal, type Revenue), CategoryId = a Revenue category (USMF Setup)​

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProjId": "000184", "JournalNameId": "Fee", "Description": "Fee journal test", "PostingDate": "2026-05-19",
"Lines": [ { "ProjId": "000184", "CategoryId": "Setup", "Qty": 1.0, "SalesPrice": 500.00, "CurrencyCode": "USD" } ] } }

Behavior: success only when the journal is posted (DocumentId = PostedDocumentId = the journal number; the journal carries the request's Description); PreviewMode = true is refused with PreviewUnsupported; when the op fails after creating the journal, the unposted journal (project, ledger or inventory) is deleted, so a retry with the same RequestId creates it again. Dependency: an InProcess project (ProjId, for example USMF 000184), journal names Hour/Fee (project journal), PrjJrn (ledger, type Cost) and ProjItem (inventory, type Project), categories Journeyman/Travel/ProjItem/Setup, worker 000001, item D0001.


MGCLatticeProjectInvoiceService​

Group: MGCLatticeProjectServiceGroup

createInvoiceProposal / createInvoiceProposalBatch​

  • Request contract: MGCLatticeProjectInvoiceProposalRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
ProjIdProjId (str)required000184Project to invoice. Only projects are looked up, not project contracts: an id that names no project (a contract id included) is DocumentNotFound.
InvoiceDateTransDateoptional2026-05-19
PostAfterCreatebooleanoptionaltruetrue = create + post; false = create proposal only.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ProjId": "000184", "InvoiceDate": "2026-05-19", "PostAfterCreate": true } }

Behavior: DocumentId = the proposal; PostedDocumentId = the posted invoice (with PostAfterCreate) or the proposal. PreviewMode = true is refused with PreviewUnsupported. With PostAfterCreate, a failed post deletes the proposal the op created and returns its transactions to invoiceable, so a retry with the same RequestId works. Dependency: project with billable, on-account transactions and a project contract in USMF.


EXPENSE MANAGEMENT​

MGCLatticeExpenseReportService​

Group: MGCLatticeExpenseServiceGroup. Both ops (and their batch twins) refuse PreviewMode = true with PreviewUnsupported; neither is registered for async execution. Security: MGCLatticeExpenseReportServiceMaintain (in MGCLatticeIntegrationServiceOperationsDuty); creating a report for a worker also needs the expense delegate rule (the worker's own user, a current delegate, or an expense administrator, expense agent or system administrator), else AccessDenied.

createExpenseReport / createExpenseReportBatch​

  • Request contract: MGCLatticeExpenseReportCreateRequestContract
  • Line contract: MGCLatticeExpenseReportLineContract
JSON fieldX++ typerequired?samplenotes
common envelope
WorkerPersonnelNumberHcmPersonnelNumberId (str)optional000020Empty = the calling user's worker (none = ValidationFailed). Unknown, or not employed in the legal entity = ValidationFailed.
PurposeTrvTravelTxtEDT (str)optionalCustomer visit Chicago
DescriptionItemFreeTxt (str)optional
LocationTrvDestination (str)optionalChicago
DimensionsList of MGCLatticeDimensionValueContractoptionalReport dimensions, merged over the worker's defaults; unresolved = DimensionValueNotFound.
LinesList of MGCLatticeExpenseReportLineContractrequired (≥1)see below
SubmitToWorkflowbooleanoptionaltrueSubmit to the expense report workflow after the create (no workflow applies = ConfigurationMissing; refused submit checks = BusinessRule).
CommentWorkflowComment (str)optionalChicago tripWorkflow comment of the submit.
Line fieldX++ typerequired?samplenotes
CategoryIdTrvCostTypeEDT (str)requiredTaxiActive expense category; with ProjId it must be a category used in projects.
TransDateTransDateoptional2026-05-19Defaults to today.
AmountAmountCur (real)required42.50Not zero.
CurrencyCodeCurrencyCode (str)optionalUSDDefaults to the accounting currency.
PaymentMethodTrvPayMethodEDT (str)optionalCashDefaults to the category's; must be allowed for the category (a category without a usable default needs one).
MerchantTrvExpMerchantId (str)optionalCity Cab
DescriptionTrvExpTransDescription (str)optionalDefaults to the category's description.
BusinessPurposeTrvLinePurposeEDT (str)optional
AdditionalInformationItemFreeTxt (str)optional
SalesTaxGroupTaxGroup (str)optionalDefault as the expense line defaults it.
ItemSalesTaxGroupTaxItemGroup (str)optionalDefault: the category's.
ProjIdProjId (str)optional000184
ActivityNumberProjActivityNumber (str)optionalOnly with ProjId.
DimensionsList of MGCLatticeDimensionValueContractoptionalMerged over the line's defaulted dimensions.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"WorkerPersonnelNumber": "000020", "Purpose": "Customer visit Chicago",
"Lines": [ { "CategoryId": "Taxi", "Amount": 42.50, "CurrencyCode": "USD", "PaymentMethod": "Cash", "Merchant": "City Cab" },
{ "CategoryId": "Travel", "Amount": 22.25, "PaymentMethod": "Cash", "ProjId": "000184" } ],
"SubmitToWorkflow": true } }

Behavior: creates the report (Draft) and its lines the way the Expense reports page does (categories, payment methods, sales tax defaults, dimensions, project rules, expense policies), then with SubmitToWorkflow submits it (In review). A request that fails after the create deletes the report and its lines again. DocumentId = the expense report number; with SubmitToWorkflow, PostedDocumentId = the workflow correlation id (lower case, no braces) for the workflow service's approveWorkItem / rejectWorkItem / delegateWorkItem / recallWorkflow / getWorkflowStatus.

Refusals: no lines, an empty line, no CategoryId, unknown or inactive category, zero amount, unknown currency / payment method / sales tax group / item sales tax group / project / activity, a payment method the category does not allow, no usable default payment method and none sent, a project on a category not used in projects, ActivityNumber without ProjId, worker problems (above) = ValidationFailed; unresolved dimension = DimensionValueNotFound; the delegate rule = AccessDenied; no expense report number sequence, no workflow for the submit = ConfigurationMissing; the standard line, report or submit checks = BusinessRule.

postExpenseReport / postExpenseReportBatch​

  • Request contract: MGCLatticeExpenseReportPostRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
ExpenseReportNumberTrvExpNumber (str)required<createExpenseReport.DocumentId>An approved expense report of the legal entity; unknown = DocumentNotFound.
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "ExpenseReportNumber": "<createExpenseReport.DocumentId>" } }

Behavior: the report's standard Post, in one transaction: vendor, ledger or bank transactions per line payment method (employee-paid lines to the worker's expense vendor), project cost transactions, sales tax; report and lines Posted. DocumentId = the report; PostedDocumentId = the first line's voucher (USMF posts one voucher per line; the message lists all). Already posted, not approved (the message names the status), a line not approved = InvalidStatus; no expense voucher number sequence = ConfigurationMissing; the standard posting checks or posting refused it = BusinessRule.

Dependency: worker 000020 (Admin's worker in USMF, expense vendor JULIAF), categories Taxi / Travel (project) with payment method Cash, project 000184, an active expense report workflow (USMF 000101) whose approval step the caller can complete. Receipts are attached with the standard ExpAttachedDocuments entity (by ExpTransNumber), not a Lattice entity.


WORKFLOW​

MGCLatticeWorkflowActionService​

Group: MGCLatticeWorkflowServiceGroup

submitToWorkflow / submitToWorkflowBatch​

  • Request contract: MGCLatticeWorkflowSubmitRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
WorkflowTypeNamestrrequiredPurchReqReviewWorkflow type (AOT name).
RecordRecIdint64one of RecId/DocumentNumber5637144576RecId of the record to submit. Wins if both provided.
TableNamestrrequiredPurchReqTableTable of the record. Supported: PurchReqTable; any other table is ValidationFailed.
DocumentNumberstrone of RecId/DocumentNumberPR-000001Natural key - the business document number (e.g. purchase requisition id). Resolves RecordRecId from TableName server-side; RecId still wins if also supplied.
CommentstroptionalSubmitting for approval
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"WorkflowTypeName": "PurchReqReview", "RecordRecId": 5637144576, "TableName": "PurchReqTable",
"DocumentNumber": "PR-000001", "Comment": "Submitting for approval" } }

Natural key: supply DocumentNumber (with TableName) to have the service resolve the record RecId from the document number; RecordRecId remains a fallback and wins if both are sent. Applies identically to each element of the submitToWorkflowBatch _requests array.

approveWorkItem / rejectWorkItem / delegateWorkItem (+ Batch)​

  • Shared request contract: MGCLatticeWorkflowActionRequestContract
JSON fieldX++ typerequired?samplenotes
common envelopeUserContext is informational; it never selects the user an action is taken as.
ActingUserIdUserId (str)requiredIngaThe user the action is taken as: the work item's assignee. A work item assigned to anyone else is refused.
WorkItemRecIdint64one of RecId/WorkflowCorrelationId5637144577RecId of the pending work item (assigned to ActingUserId). Wins if both provided.
WorkflowCorrelationIdGuid (str)one of RecId/WorkflowCorrelationId{{$guid}}Natural key - the root workflow correlation id (the submit response's DocumentId). The service resolves the pending approval work item of this workflow assigned to ActingUserId; WorkItemRecId still wins if also supplied.
CommentstroptionalApproved
DelegateToUserIdUserId (str)delegate onlySaraRequired by delegateWorkItem: an enabled user other than ActingUserId. Not used by approve and reject.

Behavior: approve and reject complete the work item with the outcome of its workflow element (Approve / Reject on an approval step, Complete on a task) through the platform's external work-item completion, as the assignee; a rejected document goes back to the workflow's originator. Delegate hands the work item to DelegateToUserId, as the assignee. When no work item is found the failure says why: unknown workflow (DocumentNotFound); pending but work items not created yet (InvalidStatus, retryable: try again later); work items assigned to other users (BusinessRule, naming them); workflow no longer pending (InvalidStatus). DocumentId = the work item RecId.

approve:

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "ActingUserId": "Inga", "WorkflowCorrelationId": "{{$guid}}", "Comment": "Approved" } }

reject:

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "ActingUserId": "Inga", "WorkflowCorrelationId": "{{$guid}}", "Comment": "Rejected - missing documentation" } }

delegate:

{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "ActingUserId": "Inga", "WorkflowCorrelationId": "{{$guid}}", "Comment": "Delegating for review", "DelegateToUserId": "Sara" } }

Natural key: supply WorkflowCorrelationId (the correlation id returned by submitToWorkflow in the response DocumentId) to have the service resolve the pending work item of ActingUserId; WorkItemRecId remains a fallback and wins if both are provided.

recallWorkflow / recallWorkflowBatch​

  • Request contract: MGCLatticeWorkflowRecallRequestContract
JSON fieldX++ typerequired?samplenotes
common envelope
WorkflowCorrelationIdGuidrequired{{$guid}}Correlation id of the running workflow instance.
CommentstroptionalRecalling for corrections
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"WorkflowCorrelationId": "00000000-0000-0000-0000-000000000000", "Comment": "Recalling for corrections" } }

DocumentId = the workflow correlation id (lower case, without braces). The platform cancels the instance asynchronously; a purchase requisition returns to Draft when the cancellation is processed. Only the workflow's originator may recall it (as the document's Recall button allows), or a caller granted the workflow history's Cancel (WorkflowStatusCancel, as that form allows); anyone else is refused with ErrorCode AccessDenied. An unknown correlation id is DocumentNotFound.

getWorkflowStatus​

  • Request contract: MGCLatticeStatusQueryRequestContract - DocumentId = the workflow correlation id submitToWorkflow returned, the source record's RecId, or the source document number (purchase requisition number, resolved like submitToWorkflow's DocumentNumber).
{ "_request": { "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "DocumentId": "be1322c8-2be8-4f1a-bc8b-ff5d00e1ab6b" } }

StatusDetails include one PendingWorkItem_<RecId> entry per pending work item of the instance, whose value is its assignee (the ActingUserId of a work-item action). A Faulted instance (it creates no work item) also carries FaultMessage: the fault text the workflow history shows. ExternalSystem + DocumentIdExternalKey (a purchase requisition's external key) may replace DocumentId. Dependency: RecordRecId, WorkItemRecId and WorkflowCorrelationId are RecId/GUID-only inputs tied to live workflow state - not creatable via OData. Must come from a real submitted workflow in USMF. WorkItemRecId must be in Pending status (service rejects otherwise).


ASYNC OPERATION​

MGCLatticeAsyncOperationService​

Group: MGCLatticeAsyncOperationServiceGroup

submitAsyncOperation (single)​

  • Request contract: MGCLatticeAsyncOperationRequestContract
  • Wraps another service operation for asynchronous execution.
JSON fieldX++ typerequired?samplenotes
CorrelationIdGuidoptional{{$guid}}
RequestIdGuidrequired{{$guid}}
LegalEntityIdDataAreaId (str)optionalUSMFRecorded on the queued operation; defaults to the payload's LegalEntityId.
UserContextUserId (str)optionalAdminInformational; recorded on the queued operation.
ServiceNamestrrequiredMGCLatticeFixedAssetServiceTarget service to run async.
OperationNamestrrequiredrunDepreciationProposalTarget operation.
RequestPayloadstrrequired(JSON string)The inner operation's _request object, serialized as a JSON string.

Access and payload checks: the caller needs access to the target operation itself (the privilege that grants it for a direct call, e.g. MGCLatticeFixedAssetsServiceMaintain for runDepreciationProposal) as well as submitAsyncOperation; without it the submission is refused. A RequestPayload that cannot be read as the target operation's request contract is refused at submit. A refused submission returns Success false, Status 4 and an all-zero TrackingId, and queues nothing. Before running, the processor re-checks the submitter's access.

{ "_request": {
"RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin",
"ServiceName": "MGCLatticeFixedAssetService", "OperationName": "runDepreciationProposal",
"RequestPayload": "{\"RequestId\":\"00000000-0000-0000-0000-000000000001\",\"LegalEntityId\":\"USMF\",\"UserContext\":\"Admin\",\"JournalNameId\":\"FACur\",\"AssetBookId\":\"200_SLLR\",\"DepreciationDate\":\"2026-05-19\"}"
} }

getAsyncOperationStatus (single, query)​

  • Request contract: MGCLatticeAsyncOperationStatusRequestContract: TrackingId (Guid, required) is the tracking id returned by submitAsyncOperation; CorrelationId (Guid, optional) is echoed. No common envelope. Response = MGCLatticeAsyncOperationStatusContract (Success is true when the operation was found; Status is the MGCLatticeAsyncOperationStatus enum, emitted as an integer: 1 Queued, 2 Processing, 3 Succeeded, 4 Failed, 7 NotFound; DocumentId and PostedDocumentId once Succeeded; ErrorCode, IsRetryable and Errors once Failed).
{ "_request": { "TrackingId": "<TrackingId-from-submit>", "CorrelationId": "{{$guid}}" } }

Dependency: TrackingId must be the id returned by a prior submitAsyncOperation call; an unknown id answers Success false, Status 7 and ErrorCode DocumentNotFound.


DATA MANAGEMENT​

MGCLatticeDmfConfigService​

Group: MGCLatticeDataManagementServiceGroup. These operations do not take the common envelope; see API reference for the specification format and the response.

OperationBodynotes
applySpec{ "_request": { "Spec": { … }, "ValidateOnly": false, "PruneMissing": false } }MGCLatticeDmfSpecApplyRequestContract. ValidateOnly = report what would change and write nothing. A missing request or Spec answers Success = false with a Message.
captureSpec{ "_projectNamePattern": "", "_jobNamePattern": "" }Both optional; empty = every data project and recurring data job.
diffSpec{ "_request": { "Spec": { … }, "PruneMissing": false } }MGCLatticeDmfSpecDiffRequestContract. Read-only: lists every difference between the specification and the environment (Differences, NotApplicable, Items). Success is false only when the comparison could not be made (no request, no Spec, an unreadable version).
specFromPackageManifest{ "_manifestXml": "…", "_projectName": "" }The contents of a data package's Manifest.xml; _projectName optional.

A specification of version 1.1 can carry each entity line's field mapping in Mapping; see API reference.

MGCLatticeDmfMappingService​

Group: MGCLatticeDataManagementServiceGroup. No common envelope; see API reference for the checks and the response.

OperationRequestnotes
validateMappingsMGCLatticeDmfMappingValidateRequestContract: DataProjectNamePattern (str, pattern such as Cust* or *), RecurringDataJobName (str)At least one is required. Read-only. A pattern that matches nothing or an unknown job is refused (Success = false). Requires MGCLatticeDmfMappingServiceView.
refreshMappingsMGCLatticeDmfMappingRefreshRequestContract: DataProjectName (str, required), EntityName (str, optional, data management name; blank = every enabled entity), RegenerateTargetMapping (bool), ValidateOnly (bool)Changes configuration unless ValidateOnly. An unknown project or entity is refused. Requires MGCLatticeDmfMappingServiceMaintain (high-risk).
{ "_request": { "DataProjectNamePattern": "Cust*", "RecurringDataJobName": "" } }
{ "_request": { "DataProjectName": "CustomerImport", "EntityName": "Customer groups", "RegenerateTargetMapping": false, "ValidateOnly": true } }

DATABASE ACCESS​

MGCLatticeDbAccessService​

Group: MGCLatticeDbAccessServiceGroup. High-risk: requires MGCLatticeDbAccessAdminPrivilege (see Security model).

OperationRequestnotes
requestAccessMGCLatticeDbAccessRequestContract: IpAddress (str, required, public IPv4), DurationHours (int, optional, default 24, clamped to 1-72)Returns MGCLatticeDbAccessResponseContract with the generated password and ServerName, the host to connect to (<server>.database.windows.net). No common envelope.
revokeAccessnoneRevokes the caller's active grants. A failure carries ErrorCode: AccessDenied (caller not authorized), TransientRuntime (the revoke was deferred to the expiry sweep, or a runtime fault), BusinessRule or UnexpectedError.
{ "_request": { "IpAddress": "203.0.113.42", "DurationHours": 8 } }

STATUS QUERIES (summary)​

All five use MGCLatticeStatusQueryRequestContract with DocumentId (str) carrying the lookup key; common envelope otherwise.

OperationService / GroupDocumentId meaningsample
getSalesOrderStatusMGCLatticeSalesOrderPostingService / ARSalesIdSO-000001
getPurchaseOrderStatusMGCLatticePurchaseOrderPostingService / APPurchIdPO-000001
getProductionOrderStatusMGCLatticeProductionOrderPostingService / ProductionProdIdP000001
getJournalStatusMGCLatticeGeneralLedgerJournalService / GLledger JournalNum (not name)00001
getWorkflowStatusMGCLatticeWorkflowActionService / WorkflowWorkflow correlation id, source RecId, or document number{BE1322C8-...} / 000031

BATCH OPERATIONS (summary)​

The posting and action ops have a sibling ...Batch op: 83 batch operations in all (182 operations across 30 services in 13 service groups). The exceptions are the 5 status queries, the 2 async ops, resolveSalesPrice, and the database access, DMF configuration and DMF mapping ops. The batch contract per element is identical to the single op's contract; only the envelope differs: { "_requests": [ {elem1}, {elem2}, ... ] }. Every batch op returns MGCLatticeBulkOperationResponseContract except setSalesPriceBatch, which returns MGCLatticeSetSalesPriceBatchResult (counts plus a Results list of MGCLatticeSetSalesPriceResult). Example (sales confirm batch):

{ "_requests": [
{ "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "SalesOrderId": "SO-000001" },
{ "RequestId": "{{$guid}}", "LegalEntityId": "USMF", "UserContext": "Admin", "SalesOrderId": "SO-000002" }
] }

RECID INPUTS (summary)​

Some inputs are record ids (RecIds) of posted records; read them from those records in the target legal entity. Most have an optional natural-key alternative that the service resolves to the RecId (when both are sent, the RecId wins):

  • MGCLatticeFreeTextInvoiceCancelRequestContract.InvoiceRecId → natural key InvoiceId (free-text invoice id).
  • MGCLatticeSettlementRequestContract.PaymentTransRecId and MGCLatticeSettlementLineContract.InvoiceTransRecId (customer or vendor transaction RecIds; the 5637144576-style values in the samples are illustrative) → natural keys request-level PaymentVoucher or PaymentInvoiceId, and line InvoiceId.
  • MGCLatticeWorkflowSubmitRequestContract.RecordRecId → natural key DocumentNumber (with TableName); MGCLatticeWorkflowActionRequestContract.WorkItemRecId → natural key WorkflowCorrelationId; MGCLatticeWorkflowRecallRequestContract.WorkflowCorrelationId is a GUID input only; getWorkflowStatus.DocumentId also accepts the document number.
  • getAsyncOperationStatus.TrackingId is the id a prior submitAsyncOperation returned.