API DOCUMENTATION
    Try Unleashed Now Sandbox

    Bill of Materials

    The Bill Of Materials resource allows bills of materials to be listed, viewed, created, updated and deleted. An individual bill of materials’ details can be viewed, updated or deleted by appending its identifier (a GUID formatted as XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) to the URI.

    The full range of URIs and HTTP Verbs supported are:

    Operation HTTP Action
    List all Bills of Materials GET /BillOfMaterials
    List a specific Bill of Materials GET /BillOfMaterials/{BillOfMaterialsGuid}
    Create a new Bill of Materials POST /BillOfMaterials/{BillOfMaterialsGuid}
    Update a Bill Of Materials PUT /BillOfMaterials/{BillOfMaterialsGuid}

    GET Bills Of Materials

    Available Filters for GET Bill Of Materials
    Filter Description
    includeObsolete If set to true, returns all Bills of Materials including obsolete. If set to false or if it is not specified then returns only active (ie. non-obsolete) Bills of Materials.
    productGuid Only returns Bills of Materials that start with the specific product guid.
    Filters are used by adding the filter and value to the URI:
    • /BillOfMatrials?includeObsolete=true&productGuid=960af835-1f6d-4123-b124-04c390715e9a
    Available Fields for GET Bill Of Materials
    Property Type Length Notes
    AverageDuration String 50 Not available for list GET
    BillNumber String 15
    BillOfMaterialsLines BillOfMaterialsLine collection
    CanAutoAssemble Boolean true,false Not available for serial or batch tracked items
    CanAutoDisassemble Boolean true,false Not available for serial or batch tracked items
    DurationType String Unit, Assembly
    ExpectedDuration String 50
    Guid Guid Unique identifier. Can only be set when adding a record.
    LastModifiedOn Nullable DateTime
    Obsolete Boolean true,false False by default, always false when adding a record.
    Product Product
    ProductionDaysPerWeek String 28
    ProductionHoursPerDay Integer
    SortByProductCode Boolean true,false
    Available Fields for Bill Of Materials Line
    Property Type Length Notes
    CreatedBy String 50
    CreatedOn DateTime
    Guid Guid Unique identifier. Can only be set when adding a record.
    LastModifiedBy String 50
    LastModifiedOn Nullable DateTime
    LineNumber Integer
    Product Product
    Quantity Decimal
    TotalCost Decimal The total cost of the Bill of Material. One value will be returned as part of the BillOfMaterial response.
    TotalLineCost Decimal The total cost of the BillOfMaterialsLine. This is the Quantity of the line multiplied by the cost of the product.
    WastageQuantity Decimal
    Available Fields for Product
    Property Type Length
    AverageLandPrice Nullable Decimal
    Barcode String 200
    CommerceCode String 14
    CreatedBy String 50
    CreatedOn Nullable DateTime
    CustomerSellPrice Nullable Decimal
    CustomsDescription String 500
    DefaultPurchasePrice Nullable Decimal
    DefaultSellPrice Nullable Decimal
    Depth Nullable Decimal
    DefaultPurchasesUnitOfMeasure UnitOfMeasure
    Guid Guid
    Height Nullable Decimal
    ICCCountryCode String 2
    ICCCountryName String 100
    IsAssembledProduct Boolean true,false
    IsBatchTracked Boolean true,false
    IsComponent Boolean true,false
    IsSellable Boolean true,false
    IsSerialized Boolean true,false
    LastCost Nullable Decimal
    LastModifiedBy String 50
    LastModifiedOn Nullable DateTime
    MaxStockAlertLevel Nullable Decimal
    MinStockAlertLevel Nullable Decimal
    MinimumOrderQuantity Nullable Decimal
    MinimumSaleQuantity Nullable Decimal
    MinimumSellPrice Nullable Decimal
    NeverDiminishing Nullable Boolean true,false
    NominalCost Nullable Decimal
    Notes String 1024
    Obsolete Boolean true,false
    PackSize Nullable Decimal
    ProductCode String 100
    ProductDescription String 500
    ProductGroup ProductGroup
    PurchaseAccount String 50
    Reminder String 1024
    ReOrderPoint Nullable Decimal
    SourceId String 500
    SourceVariantParentId String
    TaxablePurchase Nullable Boolean true,false
    TaxableSales Nullable Boolean true,false
    UnitOfMeasure UnitOfMeasure
    Weight Nullable Decimal
    Width Nullable Decimal
    XeroCostOfGoodsAccount String 50
    XeroSalesAccount String 50
    XeroSalesTaxCode String 50
    XeroSalesTaxRate Nullable Decimal
    XeroTaxCode String 50
    XeroTaxRate Nullable Decimal
    Available Fields for Product Group
    Property Type Length
    Guid Guid
    GroupName String 450
    LastModifiedOn Nullable DateTime
    Available Fields for Unit Of Measure
    Property Type Length
    Guid Guid
    Name String 20
    Obsolete Boolean true,false

    Examples for Request GET /BillOfMaterials

    show xml example
    show json example

    POST / PUT Bills Of Materials

    • Bills Of Materials can only be created for assembled products.
    • Bills Of Materials can only be created for existing products.
    • Bills Of Materials cannot be created for Obsolete products.
    Available Request Fields for POST / PUT Bill Of Materials

    Note: If one of the editable fields for PUT is blank, the previous value will be overwritten with the blank value.

    Property Type Length POST PUT Notes
    BillNumber String N/A N/A This is automatically generated. If you enter a value, it will be ignored.
    BillOfMaterialsLines BillOfMaterialsLine collection
    CanAutoAssemble Boolean true,false
    CanAutoDisassemble Boolean true,false
    DurationType String Unit,Assembly Defaults to Unit if not provided
    ExpectedDuration String 50 Must be a human-readable time string i.e. "6h 38s" or "8000m"
    Guid Guid Required Required
    Obsolete Boolean true,false
    Product Product Required Required
    ProductionDaysPerWeek String 28 Must be written as the first three letters of the English weekday, multiple days must be separated with a comma. Will revert to company default if not provided.
    ProductionHoursPerDay Integer Must be between 1 and 24 inclusive. Will revert to company default if not provided.
    SortByProductCode Boolean true,false
    Available Fields for Bill Of Materials Line
    Property Type Length POST PUT Notes
    ExpenseAccount String 500 All never diminishing products must have a valid expense account.

    Will now be mandatory for all accounts, regardless of being connected to an accounting provider or not.
    Product Product Required Required
    Quantity Decimal Required Required
    SubBillOfMaterialGuid Guid Nullable
    UnitCost Decimal Default Unit Cost is Null.
    WastageQuantity Decimal Defaults to 0 if not provided.
    Available Fields for Product

    Note: At a minimum, a valid Guid or ProductCode is required. If both Guid and ProductCode are provided but do not match, an error will be thrown.

    Property Type Length POST PUT
    Guid Guid
    ProductCode String 100

    Examples for Request POST /BillOfMaterials/{Guid}

    show xml example
    show json example

    Use the API Sandbox to see how the object is rendered in JSON or XML.

    Note: An Unleashed account is required before you can use the API Sandbox.

    Trial accounts are also allowed to connect to the API.
    You can register a new account here: Register.