API DOCUMENTATION
    Try Unleashed Now Sandbox

    Purchase Orders

    The PurchaseOrders resource allows PurchaseOrders to be listed, viewed and created. An individual purchase order’s details can be viewed 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 a page of Purchase Orders GET /PurchaseOrders
    View a Purchase Order with the specified Guid GET /PurchaseOrders/{orderGuid}
    View the Purchase Order Costs for a specific Purchase Order GET /PurchaseOrders/{orderGuid}/Costs
    Create a new Purchase Order POST /PurchaseOrders/{orderGuid}
    Create a new Purchase Order Line POST /PurchaseOrders/{orderGuid}/Lines
    Receipt a Purchase Order POST /PurchaseOrders/{orderGuid}/Receipt
    Complete a Purchase Order POST /PurchaseOrders/{orderGuid}/Complete
    Update a Purchase Order PUT /PurchaseOrders/{orderGuid}
    Update a Purchase Order Line PUT /PurchaseOrders/{orderGuid}/Lines/{lineGuid}
    Delete a Purchase Order DELETE /PurchaseOrders/{orderGuid}
    Delete a Purchase Order Line DELETE /PurchaseOrders/{orderGuid}/Lines/{lineGuid}

    GET Purchase Orders

    Available Filters for GET Purchase Orders
    Filter Description
    brief Default is true. If set to true, returns a brief summary of the product list that only includes: Guid, ProductCode, and ProductDescription. If set to false, returns Guid, ProductCode, ProductDescription, SupplierProductDescription, SupplierProductCode, and Product Group.
    completedAfter Returns Purchase Orders completed after the specified date.
    completedBefore Returns Purchase Orders completed before the specified date.
    customOrderStatus Returns Purchase Orders with the specified custom status. If specified, this filter will override the orderStatus filter.
    endDate Only return Purchases with OrderDate before a specified date
    modifiedSince Returns Purchase Orders created or edited after a specified date, must be UTC format.
    orderNumber Returns a single Purchase Order with the specified order number. If set, it overrides all other filters.
    orderStatus If filter is not provided, returns all non-deleted Purchase Orders. Only returns deleted Purchase Orders if explicitly specified in filter.
    serialBatch False by default. If set to true then the attributes SerialNumbers, PendingSerialNumbers, BatchNumbers and PendingBatchNumbers are displayed.
    startDate Only return Purchases with OrderDate after a specified date
    supplierCode Only return suppliers that start with the specific supplier code
    warehouseCode Returns Purchase Orders with the specified warehouse code.
    Note: Date filters should be provided in the ISO format YYYY-MM-DD.

    Filters are used by adding the filter and value to the URI:
    • /PurchaseOrders?supplierCode=ACME&startDate=2012-12-31
    Available Fields for GET Purchase Orders
    Property Type Length Notes
    BCSubTotal Nullable Decimal Base Currency SubTotal
    BCTaxTotal Nullable Decimal Base Currency TaxTotal
    BCTotal Nullable Decimal Base Currency Total
    Comments String 1024
    CompletedDate Nullable DateTime UTC timezone only
    CreatedBy String 50
    CreatedOn DateTime
    Currency Currency
    CustomOrderStatus String 15
    DeliveryCity String 50
    DeliveryCountry String 50
    DeliveryDate Nullable DateTime
    DeliveryName String 50
    DeliveryPostCode String 50
    DeliveryRegion String 50
    DeliveryStreetAddress String 200
    DeliveryStreetAddress2 String 200
    DeliverySuburb String 50
    DiscountRate Decimal
    ExchangeRate Nullable Decimal
    Guid Guid
    LastModifiedBy String 50
    LastModifiedOn Nullable DateTime
    OrderDate Nullable DateTime UTC timezone only
    OrderNumber String 15
    OrderStatus String 50
    Printed Nullable Boolean
    PurchaseOrderLines PurchaseOrderLine collection
    ReceivedDate Nullable DateTime The date the Purchase Order was receipted. UTC timezone only
    SalesOrders SalesOrderCollection A list of orders that are linked to a PurchaseOrder. The Guid and OrderNumber for every SalesOrder linked to a PurchaseOrder will be returned in the collection.
    SubTotal Nullable Decimal
    Supplier Supplier
    SupplierEORI String 20
    SupplierInvoiceDate Nullable DateTime UTC timezone only
    SupplierRef String 500
    Tax Tax
    TaxCode String 50
    TaxRate Nullable Decimal
    TaxTotal Nullable Decimal
    Total Nullable Decimal
    TotalVolume Nullable Decimal
    TotalWeight Nullable Decimal
    Warehouse Warehouse
    Available Fields for PurchaseOrderLine
    Property Type Length Notes
    BatchNumbers Batch collection
    BCCostTotal Decimal Base Currency CostTotal
    BCLandedCost Decimal Base Currency LandedCost
    BCSubTotal Nullable Decimal Base Currency SubTotal
    BCUnitPrice Nullable Decimal Base Currency UnitPrice
    Comments String 1024
    DeliveryDate Nullable DateTime Date only, no time component.
    DiscountedUnitPrice Decimal
    DiscountRate Decimal
    Guid Guid
    LastModifiedBy String 256
    LastModifiedOn Nullable DateTime
    LineNumber Integer
    LineTax Nullable Decimal
    LineTaxCode String 50
    LineTaxRate Decimal
    LineTotal Decimal
    OrderQuantity Decimal
    PurchaseUnitOrderQuantity Decimal
    PendingBatchNumbers PendingBatch collection Will not return a Guid (only available after the PO is receipted)
    PendingSerialNumbers PendingSerial collection Will not return a Guid (only available after the PO is receipted)
    Product Product
    PurchaseUnitOrderQuantity Decimal
    PurchaseUnitReceiptQuantity Nullable Decimal
    ReceiptQuantity Nullable Decimal
    SerialNumbers Serial collection
    UnitOfMeasure UnitOfMeasure
    UnitPrice Decimal
    Volume Nullable Decimal
    Weight Nullable Decimal
    Available Fields for Batch
    Property Type Length
    BatchNumber String 50
    ExpiryDate Date
    Guid Guid
    LastModifiedOn DateTime
    Quantity Decimal
    Available Fields for PendingBatch
    Property Type Length
    BatchNumber String 50
    CreatedOn DateTime
    ExpiryDate Date
    Quantity Decimal
    Available Fields for Serial
    Property Type Length
    SerialNumber String 50
    Guid Guid
    LastModifiedOn DateTime
    Available Fields for PendingSerial
    Property Type Length
    CreatedOn DateTime
    SerialNumber String 50

    Examples for Response GET /PurchaseOrders

    show xml example
    show json example


    Available Fields for GET /PurchaseOrders/{OrderGuid}/Costs
    Property Type Length
    AppliedDistributionMethod String 15
    BCCost Nullable Decimal
    BCTaxCost Nullable Decimal
    BCTotalCost Nullable Decimal
    Cost Decimal
    CostDate Nullable DateTime
    CostExchangeRate Nullable Decimal
    Currency String 3
    DistributionMethod String 15
    OrderExchangeRate Nullable Decimal
    Receipted Boolean
    Reference String 200
    Supplier Supplier
    TaxCode String 50
    TaxCost Decimal
    TaxRate Nullable Decimal
    TotalCost Nullable Decimal

    POST/PUT Purchase Orders

    Available Request Fields for POST/PUT Purchase Orders

    Note: Fields that specify the number of decimal places (dp) in their type will round any request values that do not match the specified accuracy.

    Property Type Length Notes POST PUT
    Comments String 1024
    Currency Currency Must match supplier's default currency N/A
    DeliveryCity String 50
    DeliveryCountry String 50
    DeliveryDate DateTime
    DeliveryName String 50
    DeliveryPostCode String 50
    DeliveryRegion String 50
    DeliveryStreetAddress String 200
    DeliveryStreetAddress2 String 200
    DeliverySuburb String 50
    DiscountRate Decimal Must be between 0 and 1
    ExchangeRate Decimal
    Guid Guid Required N/A
    OrderDate DateTime UTC timezone only
    OrderNumber String 15 N/A
    OrderStatus String 50 POST values: Parked, Placed, and Complete
    PUT values: POST values and Costed
    Required Required
    PurchaseOrderLines PurchaseOrderLine collection At least one with Placed, Costed or Complete status N/A
    ReceivedDate DateTime The date the Purchase Order was receipted. UTC timezone only N/A
    SubTotal Decimal (2dp) Required N/A
    Supplier Supplier Required Required
    SupplierEORI String 20 If not provided, defaults to the Supplier EORI number
    SupplierInvoiceDate DateTime UTC timezone only
    SupplierRef String 500
    Tax Tax N/A
    TaxCode String 50 Takes precedence over the Tax object
    TaxRate Decimal
    TaxTotal Decimal (2dp) Required N/A
    Total Decimal (2dp) Required N/A
    Warehouse Warehouse
    Available Request Fields for Currency

    Note: At a minimum, a valid Guid or CurrencyCode is required.

    Property Type Length POST
    Guid Guid Optional
    CurrencyCode String 3 Optional
    Available Request Fields for Supplier

    Note: At a minimum, a valid Guid or SupplierCode is required.

    Property Type Length POST
    Guid Guid Optional
    SupplierCode String 500 Optional
    Available Request Fields for Tax

    Note: At a minimum, a valid TaxCode or TaxRate is required.

    Property Type Length POST
    TaxCode String 25 Optional
    TaxRate Decimal Optional
    Available Request Fields for Warehouse

    Note: At a minimum, a valid Guid or WarehouseCode is required.

    Property Type Length POST
    Guid Guid Optional
    WarehouseCode String 15 Optional

    Examples for Request POST /PurchaseOrders/{orderGuid}

    show xml example
    show json example

    Examples for Request PUT /PurchaseOrders/{orderGuid}

    show xml example
    show json example

    Available Request Fields for POST/PUT Purchase Order Lines

    Note: Fields that specify the number of decimal places (dp) in their type will round any request values that do not match the specified accuracy.

    Property Type Length Notes POST PUT
    Comments String 1024
    DeliveryDate DateTime
    DiscountRate Decimal Must be between 0 and 1
    Guid Guid N/A
    LineNumber Integer Required N/A
    LineTax Decimal (2dp) Follows tax hierarchy:
    1. Product
    2. Purchase Order
    3. Supplier
    4. Default Purchase tax
    Required Required
    LineTotal Decimal (2dp) Required Required
    OrderQuantity Decimal (4dp) Quantity will be treated in the purchasing unit if UnitOfMeasure is provided Required Required
    PendingBatchNumbers PendingBatch collection
    PendingSerialNumbers PendingSerial collection
    Product Product Required N/A
    ReceiptQuantity Decimal Quantity will be treated in the purchasing unit if UnitOfMeasure is provided
    UnitOfMeasure UnitOfMeasure Must be a valid purchasing unit for the line product. If not provided, defaults to the product's base unit N/A
    UnitPrice Decimal (4dp)
    Volume Decimal If supplied, will override the Product unit's default volume N/A
    Weight Decimal If supplied, will override the Product unit's default weight N/A
    Available Request Fields for Product

    Note: At a minimum, a valid Guid or ProductCode is required.

    Property Type Length POST
    Guid Guid Optional
    ProductCode String 100 Optional
    Available Request Fields for UnitOfMeasure

    Note: At a minimum, a valid Guid or Name is required.

    Property Type Length POST
    Guid Guid Optional
    Name String 20 Optional
    Available Request Fields for PendingBatch
    Property Type Length POST
    BatchNumber (XML) / Number (JSON) String 50 Required
    Quantity Decimal Required
    ExpiryDate DateTime
    Available Request Fields for PendingSerial
    Property Type Length POST
    SerialNumber (XML) / Identifier (JSON) String 50 Required

    Examples for Request POST /PurchaseOrders/{orderGuid}/Lines

    show xml example
    show json example

    Examples for Request PUT /PurchaseOrders/{orderGuid}/Lines/{lineGuid}

    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.