Codes and Enums

SAP B1 coded-value reference โ€” the DocObjectCode / object-type table (oOrders=17, oInvoices=13, โ€ฆ), BoStatus, BoYesNoEnum, and document-type enums used in Service Layer filters.

SAP Business One is coded throughout: booleans are enums, document types are numeric object codes, and statuses are named enum members. The Service Layer metadata defines 409 EnumTypes. In an OData filter you use the enum member name as a quoted string โ€” not true/false, not a raw integer. This reference collects the codes you meet most often.

$filter=DocumentStatus eq 'bost_Open' and Cancelled eq 'tNO'

DocObjectCode โ€” the document type identifier (BoObjectTypes)

There is only one Document entity in the Service Layer; every marketing document is distinguished by its DocObjectCode. This is also the value used as a line’s BaseType in the copy chain (see the Document Line Fields reference). Both the enum name and its integer are given โ€” the integer is what appears in BaseType.

Sales โ€” Order-to-Cash

CodeIntegerEntity / endpoint
oQuotations23Sales Quotation (/Quotations)
oOrders17Sales Order (/Orders)
oDeliveryNotes15Delivery (/DeliveryNotes)
oReturns16Sales Return (/Returns)
oInvoices13A/R Invoice (/Invoices)
oCreditNotes14A/R Credit Note (/CreditNotes)
oDownPayments203A/R Down Payment (/DownPayments)
oCorrectionInvoice165A/R Correction Invoice (/CorrectionInvoice)
oDrafts112Draft (any type) (/Drafts)

Purchasing โ€” Procure-to-Pay

CodeIntegerEntity / endpoint
oPurchaseOrders22Purchase Order (/PurchaseOrders)
oPurchaseDeliveryNotes20Goods Receipt PO / GRPO (/PurchaseDeliveryNotes)
oPurchaseReturns21Purchase Return (/PurchaseReturns)
oPurchaseInvoices18A/P Invoice (/PurchaseInvoices)
oPurchaseCreditNotes19A/P Credit Note (/PurchaseCreditNotes)
oPurchaseDownPayments204A/P Down Payment (/PurchaseDownPayments)

Inventory

CodeIntegerEntity
oInventoryGenEntry59Goods Receipt (no PO)
oInventoryGenExit60Goods Issue
oStockTransfer67Stock Transfer
oStockTakings31Inventory Counting
oPickLists156Pick List
oWarehouses64Warehouse master
oItems4Item master
oItemGroups52Item Groups

Production

CodeIntegerEntity
oProductionOrders202Production Order
oProductTrees66Bill of Materials

Finance and banking

CodeIntegerEntity
oJournalEntries30Journal Entry
oChartOfAccounts1Chart of Accounts
oIncomingPayments24Incoming Payment (customer receipt)
oVendorPayments46Outgoing Payment (vendor disbursement)
oVatGroups5Tax code definitions
oChecksforPayment57Cheques for payment
oHouseBankAccounts231Company bank account master
oPriceLists6Price list master
oPaymentTermsTypes40Payment term definitions

Master data and administration

CodeIntegerEntity
oBusinessPartners2Business Partner (customer / vendor / lead)
oBusinessPartnerGroups10BP classification groups
oContacts33CRM activities
oSalesOpportunities97Sales pipeline
oDunningLetters151Dunning / reminder terms
oUsers12User master
oUserFields152UDF definitions
oUserTables153UDT definitions
oUserKeys193User-defined index definitions
oSalesPersons53Sales employee master
oTerritories200Territory master
oIndustries201Industry classification
oEmployeesInfo171Employee master

Service

CodeIntegerEntity
oServiceCalls191Service tickets
oServiceContracts190Service contract master
oCustomerEquipmentCards176Equipment at customer site
oKnowledgeBaseSolutions189Knowledge base articles

BoStatus โ€” document status

The lifecycle state of a document (DocumentStatus on the header). The two everyday values are Open and Closed; Paid and Delivered appear in specific contexts.

MemberIntegerMeaning
bost_Open0Still live โ€” not fully copied forward, not fully paid, not closed. The backlog / open receivables.
bost_Close1Finished โ€” fully drawn forward, paid, or manually closed. Excluded from open balances.
bost_Paid2Fully paid (payment contexts).
bost_Delivered3Fully delivered (delivery contexts).
$filter=DocumentStatus eq 'bost_Open'

BoYesNoEnum โ€” the boolean type

All boolean fields use this enum, not true/false. It appears on flags like Cancelled, SalesItem, InventoryItem, BackOrder, ManageSerialNumbers, and many more.

MemberIntegerMeaning
tNO0No / false
tYES1Yes / true
$filter=Cancelled eq 'tNO'

BoDocumentTypes โ€” item vs service document

Set on the header’s DocType; decides whether the document’s lines carry items or post directly to G/L accounts.

MemberIntegerMeaning
dDocument_Items0Item document โ€” lines carry ItemCode, affect stock.
dDocument_Service1Service document โ€” lines post to a G/L AccountCode, no stock.

BoCardTypes โ€” Business Partner type

The kind of partner (CardType on the BP master). See the Business Partner Fields reference for the full C/S/L meaning.

MemberLetterMeaning
cCustomerCCustomer โ€” you sell to it.
cSupplierSSupplier / vendor โ€” you buy from it.
cLidLLead โ€” a prospect, not yet a customer.

ItemTypeEnum โ€” item type

Set on the item master’s ItemType (see the Item Fields reference).

MemberMeaning
itItemsA tradeable item (stocked when InventoryItem = tYES).
itLaborLabour / service time โ€” no stock.
itTravelTravel cost โ€” no stock.
itFixedAssetsFixed asset.

How enums appear in filters โ€” the rules

  • Quote the member name. DocumentStatus eq 'bost_Open', not eq 0 and not eq bost_Open.
  • Booleans are enums. Cancelled eq 'tNO', never eq false.
  • BaseType uses the integer, because it is stored as Edm.Int32: BaseType eq 17 (an order), not 'oOrders'.
  • Dates are strings, not enums, but share the “quote it” rule: DocDate ge '20250101' (format yyyymmdd).

Discover any enum’s full member list from the metadata endpoint, which is the authoritative source (409 EnumTypes in total):

GET /b1s/v1/$metadata