> For the complete documentation index, see [llms.txt](https://docs.unimarket.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unimarket.com/documentation/general-technical/sending-pox-messages-to-unimarket.md).

# Sending POX (Plain Old XML) Messages to Unimarket

**POX (Plain Old XML)** is a simplified protocol used for communicating with Unimarket when full SOAP overhead is not required. It is primarily used for administrative and data-sync integrations like user provisioning, budget checks, and approval configurations.

## The POX Message Structure

Unlike standard cXML, which includes its own authentication headers, POX messages must be wrapped in a specific **pox-envelope**. This envelope contains two main parts:

* **Authentication Header**: Contains your tenant identifier, username, and shared secret.
* **Request Body**: Contains the actual uXML request (e.g., a budget check or user update).

## Implementation Guide

To get started with POX integration, follow these four steps:

### Step 1: Obtain Credentials

Contact Unimarket to receive the following mandatory security details:

* **Tenant Identifier**: Your unique community or supplier ID.
* **Integration Username**: The specific service account name.
* **Shared Secret**: The secure password for the integration.

### Step 2: Identify the Request Type

Determine which uXML element you need to send. Common top-level elements include:

* `validate-account-code-request`
* `user-detail-request`
* `approval-configuration-request`

### Step 3: Construct the Envelope

Wrap your request and credentials in the `pox-envelope`.

**POX Envelope Example:**

```xml
<?xml version="1.0" encoding="UTF-8"?>
<u:pox-envelope xmlns:u="http://www.unimarket.com/schema/unimarket-ws">
    <u:header>
        <u:authentication>
            <!-- Unique identifier of the Unimarket tenant (community or supplier) -->
            <u:tenant-ref identity="7f251a49-bd4d-4527-b234-d3d4a3e14e1b" domain="UNIMARKET_ID_DOMAIN"/>
            <u:sender>
                <!-- Unique identifier of the Unimarket integration user -->
                <u:user-ref identity="6cd91828-a4f4-4b70-b9ac-5f6f4d9e4082" domain="UNIMARKET_USERNAME_DOMAIN"/>
                <!-- Password used to authenticate the request -->
                <u:shared-secret>password1</u:shared-secret>
            </u:sender>
        </u:authentication>
    </u:header>
    <u:body>
        <create-quote-request xmlns='http://www.unimarket.com/schema/unimarket-ws'>
            <header>
                <to>
                    <!-- Unique Unimarket username of the user the quote is for -->
                    <user-ref identity='user1'/>
                    <!-- Unique Unimarket code of the user's community -->
                    <tenant-ref identity='AACC'/>
                </to>
                <summary>summary value</summary>
                <reference-code>quote ref value</reference-code>
                <expiry>2009-08-01T15:30:00</expiry>
            </header>
            <!-- e.g. line with tax -->
            <line quantity="2">
                <code>product code</code>
                <name>name value</name>
                <description>desc value</description>
                <unit-of-measure unit="EA"/>
                <unit-price iso-currency-code="USD">50.00</unit-price>
                <subtotal iso-currency-code="USD">100.00</subtotal>
                <tax iso-currency-code="USD">15</tax>
                <total iso-currency-code="USD">115</total>
            </line>
        </create-quote-request>
    </u:body>
</u:pox-envelope>
```

### Step 4: Submit to the Endpoint

Send your message as an **HTTPS POST** to the applicable regional URL.

| Location          | Supplier Endpoint                      | Community Endpoint                   |
| ----------------- | -------------------------------------- | ------------------------------------ |
| **United States** | `https://supplier.unimarket.com/ws`    | `https://<code>.unimarket.com/ws`    |
| **New Zealand**   | `https://supplier.unimarket.co.nz/ws`  | `https://<code>.unimarket.co.nz/ws`  |
| **Australia**     | `https://supplier.unimarket.com.au/ws` | `https://<code>.unimarket.com.au/ws` |

## Important Distinction: cXML vs. POX

It is important to note that **cXML messages** (such as `OrderRequest` or `InvoiceDetailRequest`) do **not** require a POX envelope. These messages already contain an internal `<Header>` with `<Sender>` credentials, so they can be posted directly to the endpoint without the `pox-envelope` wrapper.

{% hint style="info" %}
For the SOAP equivalent of this transport, see [Sending SOAP Messages to Unimarket](/documentation/general-technical/sending-soap-messages-to-unimarket.md). For a full list of available message types, see [Webservice Integration Technical Documentation & Examples](/documentation/general-technical/webservice-integration-technical-documentation-examples.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.unimarket.com/documentation/general-technical/sending-pox-messages-to-unimarket.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
