PrintNowPrintNowDocs

cXML

Integrate PrintNow with procurement and Print MIS systems using the cXML protocol for punchout sessions and order submission.

The cXML endpoint enables integration between PrintNow and external procurement systems (e-procurement platforms, Print MIS systems like Presswise, OneFlow, and SiteFlow) using the industry-standard cXML protocol. Unlike the REST API endpoints, cXML uses XML-based request/response envelopes with their own authentication mechanism.

Endpoint

MethodEndpointContent TypeDescription
POST/cxmlapplication/xmlHandle cXML requests (profile, punchout, orders)

Note that the cXML endpoint lives at /cxml, not under the /api/v2/ prefix used by the REST API.

Authentication

cXML requests do not use the HTTP Basic Auth header. Instead, credentials are embedded in the cXML envelope's <Header> element:

<Header>
  <From>
    <Credential domain="DUNS">
      <Identity>YOUR_STOREFRONT_PUNCHOUT_ID</Identity>
    </Credential>
  </From>
  <To>
    <Credential domain="DUNS">
      <Identity>157519294</Identity>
    </Credential>
  </To>
  <Sender>
    <Credential domain="api.printnow.com">
      <Identity>YOUR_API_TOKEN</Identity>
      <SharedSecret>YOUR_API_KEY</SharedSecret>
    </Credential>
  </Sender>
</Header>
ElementDescription
<From>Identifies the requesting storefront. The credential's domain and Identity must match a storefront's Punchout ID Type and Punchout ID configured in the admin.
<To>Must contain PrintNow's DUNS number: 157519294.
<Sender>Contains your API token (as Identity) and API key (as SharedSecret) with domain api.printnow.com. These are the same credentials used for REST API Basic Auth.

Supported Request Types

The cXML endpoint handles three request types within the cXML envelope:

Request TypeResponse TypeDescription
ProfileRequestProfileResponseDiscover supported transactions and capabilities.
PunchOutSetupRequestPunchOutSetupResponseCreate or edit a punchout session and get a redirect URL to the PrintNow editor.
OrderRequestStatus onlySubmit an order with line items, pricing, and addresses.

Profile Request

Returns the transactions supported by PrintNow's cXML endpoint. Procurement systems typically call this first to discover capabilities.

Example Request

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML payloadID="unique-id@example.com" timestamp="2026-01-15T12:00:00-05:00">
  <Header>
    <!-- credentials as described above -->
  </Header>
  <Request>
    <ProfileRequest/>
  </Request>
</cXML>

Response

Returns a ProfileResponse listing two supported transactions:

TransactionURLOptions
PunchOutSetupRequesthttps://api.printnow.com/cxmloperationAllowed: create, edit
Flow: 1
UsePricing: 1
ItemNumber: 1
ModelNumber: 1
IntegrationId: 1
CategoryId: 1
OrderRequesthttps://api.printnow.com/cxmlNone

PunchOut Setup Request

Creates or edits a punchout session and returns a URL that redirects the user to the PrintNow storefront editor.

Operations

OperationDescription
createStart a new punchout session. The user is directed to the storefront to design a product.
editResume an existing session. Requires a ConfigId extrinsic matching a previous session UUID.

Flow Types

The Flow extrinsic controls what the user sees when they land on the storefront:

FlowRequired ExtrinsicsBehavior
productOne of: ItemNumber, ModelNumber, or IntegrationIdOpens a specific product in the editor. Optionally set UsePricing=true to capture PrintNow pricing data.
categoryCategoryIdOpens a product category for the user to browse and select from.

You must provide either product identifiers or a category ID -- not both. The endpoint validates this and returns 400 Bad Request if the constraint is violated.

Extrinsics

NameRequiredDescription
FlowYesproduct or category -- determines the user experience.
ItemNumberConditionalProduct item number (for product flow).
ModelNumberConditionalProduct model number (for product flow).
IntegrationIdConditionalProduct integration ID (for product flow).
CategoryIdConditionalCategory ID to browse (for category flow).
UsePricingNoSet to true to capture PrintNow pricing data during the session (product flow only).
ConfigIdEdit onlyUUID of an existing punchout session to resume.

Example Request (Create)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML payloadID="unique-id@example.com" timestamp="2026-01-15T12:00:00-05:00">
  <Header>
    <!-- credentials -->
  </Header>
  <Request>
    <PunchOutSetupRequest operation="create">
      <BuyerCookie>session-abc-123</BuyerCookie>
      <Extrinsic name="Flow">product</Extrinsic>
      <Extrinsic name="IntegrationId">BC-001</Extrinsic>
      <Extrinsic name="UsePricing">true</Extrinsic>
      <BrowserFormPost>
        <URL>https://procurement.example.com/callback</URL>
      </BrowserFormPost>
      <Contact role="endUser">
        <Name xml:lang="en">Jane Smith</Name>
        <Email>jane@example.com</Email>
      </Contact>
    </PunchOutSetupRequest>
  </Request>
</cXML>

Response

Returns a PunchOutSetupResponse with a redirect URL:

<Response>
  <Status code="200" text="OK"/>
  <PunchOutSetupResponse>
    <StartPage>
      <URL>https://yourstore.w2p.com/punchout.aspx?uid=a1b2c3d4-...</URL>
    </StartPage>
  </PunchOutSetupResponse>
</Response>

User Resolution

The endpoint resolves the end user from <Contact role="endUser">:

  1. Match by email -- Looks for an existing customer on the storefront with the contact's email address.
  2. Create account -- If no match, creates a new customer account using the contact's name and email.
  3. Create temp user -- If no contact is provided, creates a temporary user (same behavior as PIPO temp users).

New user creation fires the customer_created webhook.

Order Request

Submits an order from a completed punchout session. The order is created in PrintNow with line items, pricing, and addresses from the cXML order envelope.

Example Request

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML payloadID="unique-id@example.com" timestamp="2026-01-15T12:00:00-05:00">
  <Header>
    <!-- credentials -->
  </Header>
  <Request>
    <OrderRequest>
      <OrderRequestHeader orderID="PO-2026-001" type="new">
        <Total>
          <Money currency="USD">150.00</Money>
        </Total>
        <ShipTo>
          <Address>
            <Name xml:lang="en">Acme Corp</Name>
            <PostalAddress>
              <DeliverTo>Jane Smith</DeliverTo>
              <Street>123 Main St</Street>
              <City>New York</City>
              <State>NY</State>
              <PostalCode>10001</PostalCode>
              <Country isoCountryCode="US">United States</Country>
            </PostalAddress>
          </Address>
        </ShipTo>
        <BillTo>
          <Address>
            <Name xml:lang="en">Acme Corp</Name>
            <PostalAddress>
              <Street>123 Main St</Street>
              <City>New York</City>
              <State>NY</State>
              <PostalCode>10001</PostalCode>
              <Country isoCountryCode="US">United States</Country>
            </PostalAddress>
          </Address>
        </BillTo>
        <Shipping>
          <Money currency="USD">10.00</Money>
          <Description xml:lang="en">Ground Shipping</Description>
        </Shipping>
        <Tax>
          <Money currency="USD">12.50</Money>
        </Tax>
        <Contact role="endUser">
          <Name xml:lang="en">Jane Smith</Name>
          <Email>jane@example.com</Email>
        </Contact>
      </OrderRequestHeader>
      <ItemOut quantity="1">
        <ItemID>
          <SupplierPartID>42</SupplierPartID>
        </ItemID>
        <ItemDetail>
          <UnitPrice>
            <Money currency="USD">127.50</Money>
          </UnitPrice>
          <Description xml:lang="en">Business Cards</Description>
          <UnitOfMeasure>EA</UnitOfMeasure>
          <Classification domain="custom">print</Classification>
          <Extrinsic name="ConfigId">a1b2c3d4-e5f6-...</Extrinsic>
        </ItemDetail>
      </ItemOut>
    </OrderRequest>
  </Request>
</cXML>

Order Processing

When an order is submitted:

  1. User resolution -- The customer is identified from the <Contact> element (same logic as PunchOut Setup).
  2. Order creation -- An order record is created with the storefront's initial (lowest-sequence) order status.
  3. Pricing -- Order totals are parsed from <Total>, <Tax>, and <Shipping>. The item subtotal is calculated as total minus tax minus shipping.
  4. Addresses -- Billing and shipping addresses are parsed from <BillTo> and <ShipTo>. If no shipping address is provided, the billing address is used. Custom extrinsics CustomerCompany, CustomerName, and IsResidential are supported on <PostalAddress>.
  5. Line items -- Each <ItemOut> becomes an order item:
    • If the SupplierPartID matches a PrintNow product ID and a ConfigId extrinsic links to a valid punchout session, PrintNow system pricing (size, color, turnaround, options) is attached.
    • Otherwise, an external product record is created using the part ID and description.
  6. File processing -- Print-ready file generation (merge) is triggered automatically.
  7. Webhook -- The order_created webhook is fired.

Address Extrinsics

The following custom extrinsics can be added to <PostalAddress> elements:

ExtrinsicDescription
CustomerCompanyCompany name for the address. If omitted, the <Address> name is used.
CustomerNameContact person name. If omitted, the <DeliverTo> value is parsed as first/last name.
IsResidentialSet to true, 1, or yes to flag as a residential address (affects shipping rate calculation).

Error Handling

All cXML responses follow the standard cXML envelope format with a <Status> element:

<Response>
  <Status code="200" text="OK"/>
</Response>
CodeTextCause
200OKRequest processed successfully.
400Bad RequestInvalid flow/product/category combination, or missing required data.
401UnauthorizedInvalid API credentials, DUNS mismatch, or storefront not found.
404Not FoundPunchout session not found (edit operation).
406Not AcceptableMissing or empty cXML envelope.
415Unsupported Media TypeContent-Type is not application/xml.
501Not ImplementedUnsupported request type or operation (e.g., delete orders).

Storefront Configuration

For cXML integration, each storefront must have a Punchout ID Type and Punchout ID configured. These values are matched against the <From> credential in the cXML header to identify which storefront the request targets.

Common configurations:

Punchout ID TypeExampleUse Case
DUNS123456789Standard DUNS number identification.
NetworkIdAN01000000001Ariba Network ID.
Custom domainprocurement.example.comCustom identifier for the procurement system.
  • Authentication — API token/key credentials used in the cXML Sender element
  • PIPO — REST-based punch-in/punch-out alternative to cXML
  • Webhooks — receive order_created and customer_created events from cXML submissions
  • Orders — retrieve and manage orders created through cXML

On this page