Invoice Integration - cXML Request

  • Updated

This information details the structure and required attributes for the cXML <Request> element, specifically focusing on the essential <InvoiceDetailRequestHeader>.

 

The cXML <Request> Element

The <Request> element is the container for the actual invoice data being sent to Unimarket.

  • deploymentMode Attribute: This required attribute specifies the environment for the request.

    • "test": Used for testing purposes.

    • "production": Used for live, operational invoices.

The <Request> contains the core document, the <InvoiceDetailRequest>, which is divided into three main sections:

  1. <InvoiceDetailRequestHeader>: Contains high-level information about the invoice.

  2. <InvoiceDetailOrder>: Contains the Purchase Order reference and the line item details. (Implied from the previous context, though not detailed in this specific text block.)

  3. <InvoiceDetailSummary>: Contains the overall financial totals (Subtotal, Tax, Gross Amount). (Implied from the previous context.)

 

Invoice Detail Request Header

The <InvoiceDetailRequestHeader> is crucial as it holds the identifying and basic descriptive attributes of the invoice.

 

Attributes

AttributeDescriptionFormat/ValueNotes
invoiceDateThe date the invoice was issued.YYYY-MM-DDIf missing, Unimarket will assign the date and time of receipt.
invoiceIDThe Invoice Number listed on the invoice.Alphanumeric stringMust be unique to identify the invoice.
operationThe type of action requested."new" (Always)Indicates a new invoice submission.
purposeThe reason for the invoice."standard" (Always)Indicates a regular transaction invoice.

Example Snippet:

<InvoiceDetailRequestHeader invoiceDate="2020-10-08" invoiceID="TestInvoice10018" operation="new" purpose="standard">

 

Elements

1. <InvoiceDetailLineIndicator>

This element uses the isTaxInLine attribute to signal if tax information is provided for each line item.

  • If isTaxInLine="yes", a separate tax element must be present for every line item.

  • This element is Required in Australia (AU) and New Zealand (NZ).

 

Example Snippet:

<InvoiceDetailLineIndicator isTaxInLine="yes"/>

 

 

2. <InvoicePartner> (Bill To Contact)

This element specifies the Bill To contact information, which will be displayed in the "Bill To" section of the invoice within Unimarket.

It contains a <Contact role="billTo"> element, providing the Name and PostalAddress (Street, City, PostalCode, and Country).

 

Example Snippet:

<InvoicePartner>
    <Contact role="billTo">
        <Name lang="en">Bill To Address</Name>
        <PostalAddress>
            <Street>123 Something Street</Street>
            <City>Auckland</City>
            <PostalCode>1010</PostalCode>
            <Country isoCountryCode="NZ">New Zealand</Country>
        </PostalAddress>
    </Contact>
</InvoicePartner>