API DOCUMENTATION
    Try Unleashed Now Sandbox

    Credit Notes

    The Credit Notes resource allows credit notes to be listed and viewed. An individual credit note 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 credit notes. GET /CreditNotes
    View credit note with the specified Guid. GET /CreditNotes/{CreditNoteGuid}
    Create free entry credit note POST /CreditNotes/FreeCredit
    Update an existing free entry credit note with the specified Guid. PUT /CreditNotes/{CreditNoteGuid}
    Delete an existing free entry credit note with the specified Guid. DELETE /CreditNotes/{CreditNoteGuid}
    Complete an existing credit note with specified Guid. POST /CreditNotes/{CreditNoteGuid}/Complete
    Create credit note lines against an existing free entry credit note POST /CreditNotes/{CreditNoteGuid}/Lines
    Update credit note line from an existing free entry credit note. PUT /CreditNotes/{CreditNoteGuid}/Lines/{CreditNoteLineGuid}
    Delete credit note line from an existing free entry credit note. DELETE /CreditNotes/{CreditNoteGuid}/Lines/{CreditNoteLineGuid}

    GET Credit Notes

    Available Filters for GET Credit Notes
    Filter Description
    creditNumber Returns a single credit note with the specified credit number. If specified, it overrides all other filters.
    creditStatus Returns credits for the specified status.
    endDate Returns credits created before a specified date.
    modifiedSince Returns credits created or edited after a specified date.
    pageSize Specifies the page size for pagination. Default page size is 200 credits.

    Note: Requesting large numbers of contacts can be susceptible to poor network performance. Please reduce the page size if you experience delayed requests.
    startDate Returns credits created after a specified date.
    Note: Date filters should be provided in the ISO format YYYY-MM-DD.

    Tip: To efficiently retrieve a count of credit notes that match a filter, specify a pageSize of 0: /CreditNotes?creditStatus=Parked&pageSize=0. The default ordering is by LastModifiedOn descending.

    Available Fields for GET Credit Notes
    Property Type Length
    BCSubTotal Decimal
    BCTotal Decimal
    Comments String 2048
    CreatedBy String 50
    CreatedOn DateTime
    CreditDate Nullable DateTime
    CreditLines CreditLine collection
    CreditNumber String 20
    CreditType String 20
    Customer Customer
    Currency Currency
    Guid Guid
    InvoiceNumber String 20
    LastModifiedBy String 50
    LastModifiedOn Nullable DateTime
    RequiredDeliveryDate Nullable DateTime
    Reference String 500
    SalesInvoiceDate Nullable DateTime
    SalesOrder SalesOrder
    Status String 20
    SubTotal Decimal
    Tax Tax
    TaxRate Nullable Decimal
    TaxTotal Decimal
    Total Decimal
    Warehouse Warehouse
    Available Fields for Currency
    Property Type Length
    CurrencyCode String 3
    DefaultBuyRate Nullable Decimal
    DefaultSellRate Nullable Decimal
    Description String 200
    Guid Guid
    LastModifiedOn DateTime
    Available Fields for Customer
    Property Type Length
    CustomerCode String 500
    CustomerName String 500
    Guid Guid
    LastModifiedOn DateTime
    Available Fields for Sales Orders

    Note: GET requests in XML will not include the Sales Order collection for Free Credits.

    Property Type Length
    Guid Guid
    OrderNumber String 20
    Available Fields for Tax
    Property Type Length
    CanApplyToExpenses Boolean
    CanApplyToRevenue Boolean
    Description String 50
    Guid Guid
    LastModifiedOn DateTime
    Obsolete Boolean
    TaxCode String 25
    TaxRate Decimal
    Available Fields for Warehouse
    Property Type Length
    AddressLine1 String 500
    AddressLine2 String 50
    City String 500
    Comments String 2048
    ContactName String 50
    Country String 500
    DDINumber String 25
    ExchangeRate Nullable Decimal
    FaxNumber String 25
    Guid Guid
    IsDefault Boolean
    LastModifiedOn DateTime
    MobileNumber String 25
    Obsolete Boolean
    PhoneNumber String 25
    PostCode String 500
    Region String 500
    StreetNo String 500
    WarehouseCode String 15
    WarehouseName String 100
    Available Fields for Credit Lines
    Property Type Length
    AverageLandedPriceAtTimeOfSale Nullable Decimal
    BatchNumbers BatchNumber Collection
    BCLineTax Nullable Decimal
    BCLineTotal Decimal
    Comments String 1024
    CostOfGoodsAccount String 500
    CreditPrice Decimal
    CreditQuantity Decimal
    Disassemble Boolean
    LineNumber Integer
    LastModifiedOn DateTime
    LineTax Nullable Decimal
    LineTaxCode String 50
    LineTotal Decimal
    LineType String
    OrderQuantity Decimal
    PendingBatchNumbers PendingBatchNumber Collection
    PendingSerialNumbers PendingSerialNumber Collection
    Product Product
    Reason String 100
    ReturnToStock Boolean
    SerialNumbers SerialNumber Collection
    TaxRate Decimal
    XeroSalesAccount String 50
    XeroTaxCode String 50
    **Note:** *`PendingBatchNumbers` and `PendingSerialNumbers` are applicable to free entry credits notes of `Parked` status only. Unleashed does not allow batch and/or serial numbers to be hard allocated to free entry credit notes while it's in `Parked` status.* {: #note}
    Available Fields for Batch Number
    Property Type Length
    ExpiryDate Nullable DateTime
    Guid Guid
    LastModifiedOn DateTime
    Number String 50
    Quantity Decimal
    Available Fields for Pending Batch Number
    Property Type Length
    CreatedOn DateTime
    ExpiryDate Nullable DateTime
    Number String 50
    Quantity Decimal
    Available Fields for Pending Serial Numbers
    Property Type Length
    CreatedOn DateTime
    Identifier String 50
    Available Fields for Product
    Property Type Length
    Guid Guid
    ProductCode String 100
    ProductDescription String 500
    Available Fields for Serial Numbers
    Property Type Length
    Guid Guid
    Identifier String 50
    LastModifiedOn DateTime

    Examples for Response GET /CreditNotes

    show xml example
    show json example

    POST/PUT Credit Notes

    Note: Please note that only ‘FreeCredit’ Credit notes can be created or updated via the API, but any note can be completed with the POST/Complete filter.

    Available Fields for POST/PUT Credit Notes
    Property Type Length POST PUT
    Comments String 1024
    CreditDate DateTime Required Required
    CreditLines CreditLine collection
    Customer Customer Required N/A
    ExchangeRate Decimal Required Required
    Reference String 500
    Warehouse Warehouse Required Required
    Available Fields for Customer

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

    Property Type Length POST PUT
    CustomerCode String 500 Optional N/A
    Guid Guid 15 Optional N/A
    Available Fields for Warehouse

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

    Property Type Length POST PUT
    Guid Guid Optional N/A
    WarehouseCode String 15 Optional N/A
    Available Fields for Credit Lines
    Property Type Length POST PUT
    BatchNumbers BatchNumber Collection
    Comments String 1024
    CreditPrice Decimal Required Required
    CreditQuantity Decimal Required Required
    Guid Guid N/A Required
    Product Product Required N/A
    Reason String Required Required
    Return Boolean Required Required
    SerialNumbers SerialNumber Collection
    Available Fields for Batch Number
    Property Type Length POST PUT
    BatchNumber (XML) / Number (JSON) String 50 Required Required
    ExpiryDate Nullable DateTime
    Quantity Decimal Required Required
    Available Fields for Product

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

    Property Type Length POST PUT
    Guid Guid Optional N/A
    ProductCode String 100 Optional N/A
    Available Fields for Serial Number
    Property Type Length POST PUT
    SerialNumber (XML) / Identifier (JSON) String 50 Required Required

    Examples for Request POST /CreditNotes/FreeCredit

    show xml example
    show json example

    Examples for Request PUT /CreditNotes/{CreditNoteGuid}

    show xml example
    show json example

    Available Fields for POST/PUT Credit Lines
    Property Type Length POST PUT
    Comments String 1024
    BatchNumbers BatchNumber Collection
    CreditPrice Decimal Required Required
    CreditQuantity Decimal Required Required
    Guid Guid N/A Required
    Product Product Required N/A
    Reason String Required Required
    Return Boolean Required Required
    SerialNumbers SerialNumber Collection
    Available Fields for Batch Number
    Property Type Length POST PUT
    BatchNumber (XML) / Number (JSON) String 50 Required Required
    ExpiryDate Nullable DateTime
    Quantity Decimal Required Required
    Available Fields for Product

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

    Property Type Length POST PUT
    Guid Guid Optional N/A
    ProductCode String 100 Optional N/A
    Available Fields for Serial Number
    Property Type Length POST PUT
    SerialNumber (XML) / Identifier (JSON) String 50 Required Required

    Examples for Request PUT /CreditNotes/{CreditNoteGuid}/Lines/{CreditNoteLinesGuid}

    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.