Este video está incrustado en el modo de privacidad mejorada de YouTube, que bloquea el establecimiento de cookies de YouTube hasta que se haga clic en el botón de reproducción. Al hacer clic en el botón de reproducción, da su consentimiento para que YouTube coloque cookies en el dispositivo que está utilizando, las cuales pueden ser utilizadas para analizar el comportamiento de uso con fines de investigación de mercado y marketing. Más detalles sobre el uso de cookies por parte de YouTube pueden encontrarse en la política de cookies de Google en https://policies.google.com/technologies/types?hl=es.
Receive orders from different cXML customers and define your own data format for our REST API. Note: This feature is currently only available to select customers under our Enterprise contracts.
Order profiles are the core of our order module. Here you have the possibility to define your own data model and to make it available via a REST API. An order profile can be assigned to one or more customers.
To do this, first switch to the Order profiles area and click on "Create new order profile" there. Now you have you can assign a name to your profile and upload a cXML file of the type "OrderRequest".
In the next step you create a data model for your order profile. For each new order profile we create a generate a proposal based on the cXML data model.
Procurement systems such as Ariba® or Coupa can be configured so that new purchase orders from your customers are sent as cXML-OrderRequest automatically to the address below. The address is identical for all your customers and uses the normal authentication of the cXML standard.
https://<instance>.enterprise.punchcommerce.com/api/v1/orders/cxml
The endpoint expects a cXML OrderRequest document as specified in chapter 7 of the cXML Reference Guide.
Important: Receiving orders is only possible for customers to whom you have assigned an order profile. Orders for unknown customers, or customers without a profile, will be automatically rejected and will not be available for not available for processing via our API.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML xml:lang="en-US" payloadID="93369535150910.10.57.136" timestamp="2000-08-03T08:49:11+07:00">
<Header>
<From>
<Credential domain="AribaNetworkUserId">
<Identity>admin@acme.com</Identity>
</Credential>
</From>
<To>
<Credential domain="DUNS">
<Identity>114315195</Identity>
</Credential>
</To>
<Sender>
<Credential domain="AribaNetworkUserId">
<Identity>sysadmin@ariba.com</Identity>
<SharedSecret>abracadabra</SharedSecret>
</Credential>
<UserAgent>Network Hub V1.1</UserAgent>
</Sender>
</Header>
<Request>
<OrderRequest>
<OrderRequestHeader orderID="DO102880" orderDate="2012-08-03T08:49:09+07:00" type="new">
<Total>
<Money currency="USD">86.50</Money>
</Total>
<ShipTo>
<Address isoCountryCode="US" addressID="1000467">
<Name xml:lang="en">Acme, Inc.</Name>
<PostalAddress name="default">
<DeliverTo>John Q. Smith</DeliverTo>
<DeliverTo>Buyers Headquarters</DeliverTo>
<Street>123 Main Street</Street>
<City>Mountain View</City>
<State isoStateCode="US-CA">CA</State>
<PostalCode>94089</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
<Email name="default">john_smith@acme.com</Email>
<Phone name="work">
<TelephoneNumber>
<CountryCode isoCountryCode="US">1</CountryCode>
<AreaOrCityCode>800</AreaOrCityCode>
<Number>5555555</Number>
</TelephoneNumber>
</Phone>
</Address>
</ShipTo>
<BillTo>
<Address isoCountryCode="US" addressID="12">
<Name xml:lang="en">Acme Accounts Payable</Name>
<PostalAddress name="default">
<Street>124 Union Street</Street>
<City>San Francisco</City>
<State isoStateCode="US-CA">CA</State>
<PostalCode>94128</PostalCode>
<Country isoCountryCode="US">United States</Country>
</PostalAddress>
<Phone name="work">
<TelephoneNumber>
<CountryCode isoCountryCode="US">1</CountryCode>
<AreaOrCityCode>415</AreaOrCityCode>
<Number>6666666</Number>
</TelephoneNumber>
</Phone>
</Address>
</BillTo>
<LegalEntity>
<IdReference domain="CompanyCode" identifier="CH01">
<Description>SAP AG</Description>
</IdReference>
</LegalEntity>
<OrganizationalUnit>
<IdReference domain=" PurchasingOrganization" identifier="SCP">
<Description> SCPM Purchasing Org </Description>
</IdReference>
</OrganizationalUnit>
<OrganizationalUnit>
<IdReference domain=" PurchasingGroup" identifier="0001">
<Description> PGP Buyer </Description>
</IdReference>
</OrganizationalUnit>
<Shipping>
<Money currency="USD">10.00</Money>
<Description xml:lang="en-US">FedEx 2-day</Description>
</Shipping>
<Tax>
<Money currency="USD">1.5</Money>
<Description xml:lang="en">CA State Tax</Description>
</Tax>
<Payment>
<PCard number="1234567890123456" expiration="2015-03-12"/>
</Payment>
</OrderRequestHeader>
<ItemOut quantity="2" lineNumber="1">
<ItemID>
<SupplierPartID>220-3165</SupplierPartID>
<SupplierPartAuxiliaryID>E000028901</SupplierPartAuxiliaryID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="USD">55.00</Money>
<Modifications>
<Modification>
<OriginalPrice>
<Money currency = "USD">50.00</Money>
</OriginalPrice>
<AdditionalCost>
<Money currency = "USD">5</Money>
</AdditionalCost>
<ModificationDetail endDate = "2013-11-30T10:15:00-08:00" name = "Royalties" startDate = "2012-08-03T10:15:00-08:00">
<Description xml:lang = "en-US">Charge for Royalties</Description>
</ModificationDetail>
</Modification>
</Modifications>
</UnitPrice>
<Description xml:lang="en">Laptop Computer Notebook Pentium® II
processor w/AGP, 300 MHz, with 12.1" TFT XGA
Display</Description>
<UnitOfMeasure>EA</UnitOfMeasure>
<Classification domain="UNSPSC">43171801</Classification>
<URL>http://www.supplier.com/Punchout.asp</URL>
<Extrinsic name="ExtDescription">Enhanced keyboard</Extrinsic>
</ItemDetail>
<Distribution>
<Accounting name="DistributionCharge">
<AccountingSegment id="7720">
<Name xml:lang="en-US">Account</Name>
<Description xml:lang="en-US">Office Supplies
</Description>
</AccountingSegment>
<AccountingSegment id="610">
<Name xml:lang="en-US">Cost Center</Name>
<Description xml:lang="en-US">Engineering Management
</Description>
</AccountingSegment>
</Accounting>
<Charge>
<Money currency="USD">20.00</Money>
</Charge>
</Distribution>
</ItemOut>
</OrderRequest>
</Request>
</cXML>
Our system responds, if there is no error in processing the order, with the following (example) response as a confirmation of the receipt of the order. No commercial obligation arises at this step.
<cXML payloadID="9949494" xml:lang="en"
timestamp="1999-03-12T18:39:09-08:00">
<Response>
<Status code="200" text="OK"/>
</Response>
</cXML>
For each order profile, individual access data is generated in the form of a token and a URL for our REST API.
List of all orders of a profile
Query a list of all orders received:
GET {{punchcommerce_host}}/api/v1/profile/{{profile_id}}
Response:
{
"data": {
"id": "4a152855-1a26-4059-a637-4d56cc151d9e",
"name": "adsd",
"customers": [
{
"uuid": "69f14942-178d-4d57-b6d5-fdd9d4aee407",
"name": "Mraz Inc"
}
],
"orders": [
{
"id": "cb074373-60d9-4c1b-9453-988602da457e",
"customer_id": "69f14942-178d-4d57-b6d5-fdd9d4aee407",
"customer": "Mraz Inc",
"created_at": "2022-10-03T13:21:16.000000Z",
"link": "https://punchcommerce.local/api/v1/profile/4a152855-1a26-4059-a637-4d56cc151d9e/order/cb074373-60d9-4c1b-9453-988602da457e"
},
{
"id": "b8f7e5e1-b4da-4bc6-b4b1-7f2e85d3b99d",
"customer_id": "69f14942-178d-4d57-b6d5-fdd9d4aee407",
"customer": "Mraz Inc",
"created_at": "2022-10-03T13:20:29.000000Z",
"link": "https://punchcommerce.local/api/v1/profile/4a152855-1a26-4059-a637-4d56cc151d9e/order/b8f7e5e1-b4da-4bc6-b4b1-7f2e85d3b99d"
},
{
"id": "f09473fc-876b-4005-bd7e-df8bdd53ccbc",
"customer_id": "69f14942-178d-4d57-b6d5-fdd9d4aee407",
"customer": "Mraz Inc",
"created_at": "2022-10-03T13:12:15.000000Z",
"link": "https://punchcommerce.local/api/v1/profile/4a152855-1a26-4059-a637-4d56cc151d9e/order/f09473fc-876b-4005-bd7e-df8bdd53ccbc"
},
{
"id": "e7eed80a-6d0d-4657-8d85-ae4e4c9f13ae",
"customer_id": "69f14942-178d-4d57-b6d5-fdd9d4aee407",
"customer": "Mraz Inc",
"created_at": "2022-09-19T09:43:09.000000Z",
"link": "https://punchcommerce.local/api/v1/profile/4a152855-1a26-4059-a637-4d56cc151d9e/order/e7eed80a-6d0d-4657-8d85-ae4e4c9f13ae"
},
{
"id": "3b379913-77a0-441a-af57-d45308a94738",
"customer_id": "69f14942-178d-4d57-b6d5-fdd9d4aee407",
"customer": "Mraz Inc",
"created_at": "2022-09-19T09:43:07.000000Z",
"link": "https://punchcommerce.local/api/v1/profile/4a152855-1a26-4059-a637-4d56cc151d9e/order/3b379913-77a0-441a-af57-d45308a94738"
}
]
}
Order details
Attention, the response to this request depends on the data model you have configured for the corresponding order profile configured in our system.
{{punchcommerce_host}}/api/v1/profile/{{profile_id}}/order/{{order_id}}
Sample Response:
{
"data": {
"meta": {
"request_id": "1637737323553.569506334.000002897@IrwnYChEL2oZa48FesaJ62+R18I=",
"cxml_version": "1.2.044",
"language": "en-US"
},
"order": {
"total": "17",
"currency": "EUR",
"date": "2021-11-23T23:01:59-08:00",
"reference": "EP686328",
"version": 1,
"billing": {
"company": "FOOBAR GMBH - RECHNUNGSPRUEFUNG",
"street": "Walter-Flex-Str. 27",
"zip": "24000",
"city": "Hamburg",
"country": "Deutschland"
},
"shipping": {
"company": "FOOBAR GMBH",
"street": "Walter-Flex-Str. 27",
"zip": "65428",
"city": "Rüsselsheim",
"country": "Deutschland"
},
"items": [
{
"index": 1,
"ordernumber": "FOOBAR_VK-deutsch_up",
"quantity": 100,
"name": "FOOBAR Visitenkarte (Deutsch)",
"unit_price": "0.17",
"unit": "EA"
}
]
}
}