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.
deploymentModeAttribute: 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:
<InvoiceDetailRequestHeader>: Contains high-level information about the invoice.<InvoiceDetailOrder>: Contains the Purchase Order reference and the line item details. (Implied from the previous context, though not detailed in this specific text block.)<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
| Attribute | Description | Format/Value | Notes |
|---|---|---|---|
invoiceDate | The date the invoice was issued. | YYYY-MM-DD | If missing, Unimarket will assign the date and time of receipt. |
invoiceID | The Invoice Number listed on the invoice. | Alphanumeric string | Must be unique to identify the invoice. |
operation | The type of action requested. | "new" (Always) | Indicates a new invoice submission. |
purpose | The 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>