Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML payloadID="{$punchOutSetupRequest->payloadId}" xml:lang="{$punchOutSetupRequest->language}" timestamp="{$punchOutSetupRequest->timestamp->format('c')}" version="1.2.0.14">
    <Header>
        <From>
            <Credential domain="{$punchOutSetupRequest->fromCredential->domain}">
                <Identity>{$punchOutSetupRequest->fromCredential->identity}</Identity>
            </Credential>
        </From>
        <To>
            <Credential domain="{$punchOutSetupRequest->toCredential->domain}">
                <Identity>{$punchOutSetupRequest->toCredential->identity}</Identity>
            </Credential>
        </To>
        <Sender>
            <Credential domain="{$punchOutSetupRequest->senderCredential->domain}">
                <Identity>{$punchOutSetupRequest->senderCredential->identity}</Identity>
            </Credential>
            <UserAgent/>
        </Sender>
    </Header>
    <Message deploymentMode="production">
        <PunchOutOrderMessage>
            <BuyerCookie>{$punchOutSetupRequest->requestBody->buyerCookie}</BuyerCookie>
            <PunchOutOrderMessageHeader operationAllowed="edit" quoteStatus="final">
                <Total>
                    <Money currency="{$order->total->getCurrency()}">{($order->totalWithVat)|number_format:2:'.':''}</Money>
                </Total>
                <Shipping>
                    <Money currency="{$order->shipping->shippingCost->getCurrency()}">{($order->shipping->shippingCost->getAmount()/100)|number_format:4:'.':''}</Money>
                </Shipping>
                <Tax>
                    <Money currency="{$order->total->getCurrency()}">{($order->vat)|number_format:2:'.':''}</Money>
                </Tax>
            </PunchOutOrderMessageHeader>
            {foreach from=$orderItems item=orderItem} 
            <ItemIn quantity="{$orderItem->quantityValue}">
                <ItemID>
                    <SupplierPartID>{$orderItem->id}</SupplierPartID>
                    <SupplierPartAuxiliaryID>{$order->id}</SupplierPartAuxiliaryID>
                </ItemID>
                <ItemDetail>
                    <UnitPrice>
                        <Money currency="{$orderItem->total->getCurrency()}">{($orderItem->total->getAmount()/100)|number_format:4:'.':''}</Money>
                    </UnitPrice>
                    <Description xml:lang="{$punchOutSetupRequest->language}">{$orderItem->name}</Description>
                </ItemDetail>
            </ItemIn>
            {/foreach} 
        </PunchOutOrderMessage>
    </Message>
</cXML>

Endpunkte der Schnittstelle

BezeichnungEndpunkt / URL
Login-Sprung in die PRINT LOUNGE
Hierzu wird ein PunchOutRequest-Dokument an diesen Endpunkt gesendet.
/coupa/processDocument
Einlieferung einer Bestellung
Für die Einlieferung & Bestätigung einer Bestellung wird ein OrderRequest-Dokument an diesen Endpunkt gesendet.
/coupa/processOrder