• Dernière modification le: 12 August 2019

Exemples d'appels API

Exemple de requête de demandes - Requête par utilisateur spécifique

Dans cet exemple, nous recherchons des demandes créées par l'utilisateur avec un identifiant de connexion 'ejohnson'. Nous pourrions facilement remplacer le paramètre de connexion ci-dessous par un e-mail ou un numéro d'employé

  • HTTP GET https://<instance>.coupahost.com/api/requisitions?requested-by[login]=<login>
    Dans ce cas https://<instance>.coupahost.com/api/requisitions?requested-by[login]=ejohnson
<?xml version="1.0" encoding="UTF-8"?>
<requisition-headers type="array">
	 <requisition-header>
			<id type="integer">97</id>
			<created-at type="datetime">2009-04-27T09:27:56-07:00</created-at>
			<updated-at type="datetime">2009-04-27T09:27:56-07:00</updated-at>
			<buyer-note nil="true" />
			<justification nil="true" />
			<need-by-date nil="true" />
			<reject-reason-comment nil="true" />
			<status>draft</status>
			<submitted-at nil="true" />
			<exported type="boolean">false</exported>
			<ship-to-attention>Ellis (Marketing Lead) Johnson</ship-to-attention>
			<total type="decimal">20575.00</total>
			<height-passthrough />
			<custom-attach />
			<custom-field-3 />
			<currency>
				 <id type="integer">1</id>
				 <code>USD</code>
			</currency>
			<department>
				 <id type="integer">1</id>
				 <created-at type="datetime">2008-10-27T13:00:48-07:00</created-at>
				 <updated-at type="datetime">2009-05-04T18:20:29-07:00</updated-at>
				 <name>Marketing</name>
				 <active type="boolean">true</active>
				 <created-by>
						<id type="integer">1</id>
						<login>coupasupport</login>
						<email>robert.monahon+feardemo@coupa.com</email>
						<employee-number />
						<firstname>Coupa</firstname>
						<lastname>Support</lastname>
						<salesforce-id nil="true" />
						<height />
				 </created-by>
				 <updated-by>
						<id type="integer">16</id>
						<login>administrator</login>
						<email>jonathan.fear@coupa.com</email>
						<employee-number />
						<firstname>Kyle</firstname>
						<lastname>Eisner</lastname>
						<salesforce-id nil="true" />
						<height>hello,,,,</height>
				 </updated-by>
			</department>
			<requested-by>
				 <id type="integer">7</id>
				 <login>ejohnson</login>
				 <email>upgrade+ej@coupa.com</email>
				 <employee-number />
				 <firstname>Ellis (Marketing Lead)</firstname>
				 <lastname>Johnson</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</requested-by>
			<ship-to-address>
				 <id type="integer">16</id>
				 <created-at type="datetime">2008-10-27T13:00:19-07:00</created-at>
				 <updated-at type="datetime">2009-07-11T13:33:25-07:00</updated-at>
				 <name>HQ</name>
				 <street1>28 Nevada Blvd</street1>
				 <street2 />
				 <city>Laughlin</city>
				 <state>NV</state>
				 <postal-code>89028</postal-code>
				 <attention />
				 <active type="boolean">true</active>
				 <country>
						<id type="integer">223</id>
						<code>US</code>
						<name>United States</name>
				 </country>
				 <created-by>
						<id type="integer">1</id>
						<login>coupasupport</login>
						<email>robert.monahon+feardemo@coupa.com</email>
						<employee-number />
						<firstname>Coupa</firstname>
						<lastname>Support</lastname>
						<salesforce-id nil="true" />
						<height />
				 </created-by>
				 <updated-by>
						<id type="integer">16</id>
						<login>administrator</login>
						<email>jonathan.fear@coupa.com</email>
						<employee-number />
						<firstname>Kyle</firstname>
						<lastname>Eisner</lastname>
						<salesforce-id nil="true" />
						<height>hello,,,,</height>
				 </updated-by>
			</ship-to-address>
			<attachments type="array" />
			<requisition-lines type="array">
				 <requisition-line>
						<id type="integer">179</id>
						<created-at type="datetime">2009-04-27T09:27:56-07:00</created-at>
						<updated-at type="datetime">2009-04-27T09:27:57-07:00</updated-at>
						<description>Facility Rental for 8 hours</description>
						<line-num type="integer">1</line-num>
						<need-by-date nil="true" />
						<order-line-id nil="true" />
						<quantity type="float">8.0</quantity>
						<source-part-num />
						<status nil="true" />
						<sub-line-num nil="true" />
						<supp-aux-part-num nil="true" />
						<total type="decimal">16400.00</total>
						<source-type>Non-Catalog Request</source-type>
						<line-type>RequisitionQuantityLine</line-type>
						<unit-price type="decimal">2050.00</unit-price>
						<account>
							 <id type="integer">164</id>
							 <created-at type="datetime">2009-05-04T22:06:02-07:00</created-at>
							 <updated-at type="datetime">2009-05-05T23:23:54-07:00</updated-at>
							 <name>HQ -Marketing, Events</name>
							 <code>HQ-Marketing-Events</code>
							 <active type="boolean">true</active>
							 <segment-1>HQ</segment-1>
							 <segment-2>Marketing</segment-2>
							 <segment-3>Events</segment-3>
							 <segment-4 />
							 <segment-5 />
							 <segment-6 />
							 <segment-7 />
							 <segment-8 />
							 <segment-9 />
							 <segment-10 />
							 <segment-11 />
							 <segment-12 />
							 <segment-13 />
							 <segment-14 />
							 <segment-15 />
							 <segment-16 />
							 <segment-17 />
							 <segment-18 />
							 <segment-19 />
							 <segment-20 />
							 <account-type>
									<id type="integer">1</id>
									<created-at type="datetime">2008-10-27T13:10:01-07:00</created-at>
									<updated-at type="datetime">2011-09-01T11:57:27-07:00</updated-at>
									<name>Ace Corporate</name>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </account-type>
							 <created-by>
									<id type="integer">16</id>
									<login>administrator</login>
									<email>jonathan.fear@coupa.com</email>
									<employee-number />
									<firstname>Kyle</firstname>
									<lastname>Eisner</lastname>
									<salesforce-id nil="true" />
									<height>hello,,,,</height>
							 </created-by>
							 <updated-by>
									<id type="integer">10</id>
									<login>amanning</login>
									<email>upgrade+am@coupa.com</email>
									<employee-number />
									<firstname>Anna (AP Director)</firstname>
									<lastname>Manning</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</account>
						<account-allocations type="array" />
						<commodity>
							 <id type="integer">7</id>
							 <created-at type="datetime">2008-10-27T13:04:00-07:00</created-at>
							 <updated-at type="datetime">2011-04-12T14:08:22-07:00</updated-at>
							 <active type="boolean">false</active>
							 <name>Marketing-Services</name>
							 <acct />
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</commodity>
						<currency>
							 <id type="integer">1</id>
							 <code>USD</code>
						</currency>
						<supplier>
							 <id type="integer">25</id>
							 <name>Aston's Hotel</name>
							 <number nil="true" />
							 <supplier-diversity />
							 <primary-contact>
									<id type="integer">27</id>
									<created-at type="datetime">2008-12-09T13:08:11-08:00</created-at>
									<updated-at type="datetime">2011-07-25T16:49:07-07:00</updated-at>
									<email />
									<name-prefix nil="true" />
									<name-suffix nil="true" />
									<name-additional nil="true" />
									<name-given>Sanae</name-given>
									<name-family>Kadomoto</name-family>
									<name-fullname nil="true" />
									<notes nil="true" />
									<created-by>
										 <id type="integer">7</id>
										 <login>ejohnson</login>
										 <email>upgrade+ej@coupa.com</email>
										 <employee-number />
										 <firstname>Ellis (Marketing Lead)</firstname>
										 <lastname>Johnson</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </primary-contact>
							 <primary-address>
									<id type="integer">33</id>
									<created-at type="datetime">2008-12-09T13:08:11-08:00</created-at>
									<updated-at type="datetime">2011-07-25T16:49:07-07:00</updated-at>
									<name>Aston's Hotel</name>
									<street1>3615 Lower Honoapiilani Road</street1>
									<street2 />
									<city>Lahaina</city>
									<state>HI</state>
									<postal-code>96761</postal-code>
									<attention nil="true" />
									<active type="boolean">true</active>
									<country>
										 <id type="integer">223</id>
										 <code>US</code>
										 <name>United States</name>
									</country>
									<created-by>
										 <id type="integer">7</id>
										 <login>ejohnson</login>
										 <email>upgrade+ej@coupa.com</email>
										 <employee-number />
										 <firstname>Ellis (Marketing Lead)</firstname>
										 <lastname>Johnson</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </primary-address>
						</supplier>
						<uom>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>EA</code>
							 <name>Each</name>
							 <allowable-precision type="integer">0</allowable-precision>
							 <active type="boolean">true</active>
						</uom>
						<payment-term>
							 <id type="integer">3</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>2/10 Net 30</code>
							 <description />
							 <days-for-net-payment type="integer">30</days-for-net-payment>
							 <days-for-discount-payment type="integer">10</days-for-discount-payment>
							 <discount-rate type="float">2.0</discount-rate>
							 <active type="boolean">true</active>
						</payment-term>
						<shipping-term>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>Standard</code>
						</shipping-term>
						<asset-tags type="array" />
						<attachments type="array" />
						<created-by>
							 <id type="integer">7</id>
							 <login>ejohnson</login>
							 <email>upgrade+ej@coupa.com</email>
							 <employee-number />
							 <firstname>Ellis (Marketing Lead)</firstname>
							 <lastname>Johnson</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</created-by>
						<updated-by>
							 <id type="integer">7</id>
							 <login>ejohnson</login>
							 <email>upgrade+ej@coupa.com</email>
							 <employee-number />
							 <firstname>Ellis (Marketing Lead)</firstname>
							 <lastname>Johnson</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</updated-by>
				 </requisition-line>
				 <requisition-line>
						<id type="integer">180</id>
						<created-at type="datetime">2009-04-27T09:27:56-07:00</created-at>
						<updated-at type="datetime">2009-04-27T09:27:57-07:00</updated-at>
						<description>Ice Sculpture</description>
						<line-num type="integer">2</line-num>
						<need-by-date nil="true" />
						<order-line-id nil="true" />
						<source-part-num />
						<status nil="true" />
						<sub-line-num nil="true" />
						<supp-aux-part-num nil="true" />
						<total type="decimal">1500.00</total>
						<source-type>Non-Catalog Request</source-type>
						<line-type>RequisitionAmountLine</line-type>
						<unit-price type="decimal">1500.00</unit-price>
						<account>
							 <id type="integer">164</id>
							 <created-at type="datetime">2009-05-04T22:06:02-07:00</created-at>
							 <updated-at type="datetime">2009-05-05T23:23:54-07:00</updated-at>
							 <name>HQ -Marketing, Events</name>
							 <code>HQ-Marketing-Events</code>
							 <active type="boolean">true</active>
							 <segment-1>HQ</segment-1>
							 <segment-2>Marketing</segment-2>
							 <segment-3>Events</segment-3>
							 <segment-4 />
							 <segment-5 />
							 <segment-6 />
							 <segment-7 />
							 <segment-8 />
							 <segment-9 />
							 <segment-10 />
							 <segment-11 />
							 <segment-12 />
							 <segment-13 />
							 <segment-14 />
							 <segment-15 />
							 <segment-16 />
							 <segment-17 />
							 <segment-18 />
							 <segment-19 />
							 <segment-20 />
							 <account-type>
									<id type="integer">1</id>
									<created-at type="datetime">2008-10-27T13:10:01-07:00</created-at>
									<updated-at type="datetime">2011-09-01T11:57:27-07:00</updated-at>
									<name>Ace Corporate</name>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </account-type>
							 <created-by>
									<id type="integer">16</id>
									<login>administrator</login>
									<email>jonathan.fear@coupa.com</email>
									<employee-number />
									<firstname>Kyle</firstname>
									<lastname>Eisner</lastname>
									<salesforce-id nil="true" />
									<height>hello,,,,</height>
							 </created-by>
							 <updated-by>
									<id type="integer">10</id>
									<login>amanning</login>
									<email>upgrade+am@coupa.com</email>
									<employee-number />
									<firstname>Anna (AP Director)</firstname>
									<lastname>Manning</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</account>
						<account-allocations type="array" />
						<commodity>
							 <id type="integer">7</id>
							 <created-at type="datetime">2008-10-27T13:04:00-07:00</created-at>
							 <updated-at type="datetime">2011-04-12T14:08:22-07:00</updated-at>
							 <active type="boolean">false</active>
							 <name>Marketing-Services</name>
							 <acct />
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</commodity>
						<currency>
							 <id type="integer">1</id>
							 <code>USD</code>
						</currency>
						<supplier>
							 <id type="integer">25</id>
							 <name>Aston's Hotel</name>
							 <number nil="true" />
							 <supplier-diversity />
							 <primary-contact>
									<id type="integer">27</id>
									<created-at type="datetime">2008-12-09T13:08:11-08:00</created-at>
									<updated-at type="datetime">2011-07-25T16:49:07-07:00</updated-at>
									<email />
									<name-prefix nil="true" />
									<name-suffix nil="true" />
									<name-additional nil="true" />
									<name-given>Sanae</name-given>
									<name-family>Kadomoto</name-family>
									<name-fullname nil="true" />
									<notes nil="true" />
									<created-by>
										 <id type="integer">7</id>
										 <login>ejohnson</login>
										 <email>upgrade+ej@coupa.com</email>
										 <employee-number />
										 <firstname>Ellis (Marketing Lead)</firstname>
										 <lastname>Johnson</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </primary-contact>
							 <primary-address>
									<id type="integer">33</id>
									<created-at type="datetime">2008-12-09T13:08:11-08:00</created-at>
									<updated-at type="datetime">2011-07-25T16:49:07-07:00</updated-at>
									<name>Aston's Hotel</name>
									<street1>3615 Lower Honoapiilani Road</street1>
									<street2 />
									<city>Lahaina</city>
									<state>HI</state>
									<postal-code>96761</postal-code>
									<attention nil="true" />
									<active type="boolean">true</active>
									<country>
										 <id type="integer">223</id>
										 <code>US</code>
										 <name>United States</name>
									</country>
									<created-by>
										 <id type="integer">7</id>
										 <login>ejohnson</login>
										 <email>upgrade+ej@coupa.com</email>
										 <employee-number />
										 <firstname>Ellis (Marketing Lead)</firstname>
										 <lastname>Johnson</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </primary-address>
						</supplier>
						<payment-term>
							 <id type="integer">3</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>2/10 Net 30</code>
							 <description />
							 <days-for-net-payment type="integer">30</days-for-net-payment>
							 <days-for-discount-payment type="integer">10</days-for-discount-payment>
							 <discount-rate type="float">2.0</discount-rate>
							 <active type="boolean">true</active>
						</payment-term>
						<shipping-term>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>Standard</code>
						</shipping-term>
						<asset-tags type="array" />
						<attachments type="array" />
						<created-by>
							 <id type="integer">7</id>
							 <login>ejohnson</login>
							 <email>upgrade+ej@coupa.com</email>
							 <employee-number />
							 <firstname>Ellis (Marketing Lead)</firstname>
							 <lastname>Johnson</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</created-by>
						<updated-by>
							 <id type="integer">7</id>
							 <login>ejohnson</login>
							 <email>upgrade+ej@coupa.com</email>
							 <employee-number />
							 <firstname>Ellis (Marketing Lead)</firstname>
							 <lastname>Johnson</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</updated-by>
				 </requisition-line>
				 <requisition-line>
						<id type="integer">181</id>
						<created-at type="datetime">2009-04-27T09:27:56-07:00</created-at>
						<updated-at type="datetime">2009-04-27T09:27:58-07:00</updated-at>
						<description>Food from Cheung</description>
						<line-num type="integer">3</line-num>
						<need-by-date nil="true" />
						<order-line-id nil="true" />
						<source-part-num />
						<status nil="true" />
						<sub-line-num nil="true" />
						<supp-aux-part-num nil="true" />
						<total type="decimal">2675.00</total>
						<source-type>Non-Catalog Request</source-type>
						<line-type>RequisitionAmountLine</line-type>
						<unit-price type="decimal">2675.00</unit-price>
						<account>
							 <id type="integer">164</id>
							 <created-at type="datetime">2009-05-04T22:06:02-07:00</created-at>
							 <updated-at type="datetime">2009-05-05T23:23:54-07:00</updated-at>
							 <name>HQ -Marketing, Events</name>
							 <code>HQ-Marketing-Events</code>
							 <active type="boolean">true</active>
							 <segment-1>HQ</segment-1>
							 <segment-2>Marketing</segment-2>
							 <segment-3>Events</segment-3>
							 <segment-4 />
							 <segment-5 />
							 <segment-6 />
							 <segment-7 />
							 <segment-8 />
							 <segment-9 />
							 <segment-10 />
							 <segment-11 />
							 <segment-12 />
							 <segment-13 />
							 <segment-14 />
							 <segment-15 />
							 <segment-16 />
							 <segment-17 />
							 <segment-18 />
							 <segment-19 />
							 <segment-20 />
							 <account-type>
									<id type="integer">1</id>
									<created-at type="datetime">2008-10-27T13:10:01-07:00</created-at>
									<updated-at type="datetime">2011-09-01T11:57:27-07:00</updated-at>
									<name>Ace Corporate</name>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </account-type>
							 <created-by>
									<id type="integer">16</id>
									<login>administrator</login>
									<email>jonathan.fear@coupa.com</email>
									<employee-number />
									<firstname>Kyle</firstname>
									<lastname>Eisner</lastname>
									<salesforce-id nil="true" />
									<height>hello,,,,</height>
							 </created-by>
							 <updated-by>
									<id type="integer">10</id>
									<login>amanning</login>
									<email>upgrade+am@coupa.com</email>
									<employee-number />
									<firstname>Anna (AP Director)</firstname>
									<lastname>Manning</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</account>
						<account-allocations type="array" />
						<commodity>
							 <id type="integer">1</id>
							 <created-at type="datetime">2008-10-27T13:03:59-07:00</created-at>
							 <updated-at type="datetime">2011-04-12T14:58:18-07:00</updated-at>
							 <active type="boolean">true</active>
							 <name>Labor</name>
							 <acct>Temp Labor</acct>
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</commodity>
						<currency>
							 <id type="integer">1</id>
							 <code>USD</code>
						</currency>
						<supplier>
							 <id type="integer">24</id>
							 <name>Cheung Catering</name>
							 <number nil="true" />
							 <supplier-diversity />
							 <primary-contact>
									<id type="integer">26</id>
									<created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
									<updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
									<email />
									<name-prefix nil="true" />
									<name-suffix nil="true" />
									<name-additional nil="true" />
									<name-given>Conway</name-given>
									<name-family>Cheung</name-family>
									<name-fullname nil="true" />
									<notes nil="true" />
									<phone-work>
										 <id type="integer">67</id>
										 <created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
										 <updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code nil="true" />
										 <number />
										 <extension nil="true" />
										 <created-by>
												<id type="integer">7</id>
												<login>ejohnson</login>
												<email>upgrade+ej@coupa.com</email>
												<employee-number />
												<firstname>Ellis (Marketing Lead)</firstname>
												<lastname>Johnson</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-work>
									<phone-mobile>
										 <id type="integer">68</id>
										 <created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
										 <updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code nil="true" />
										 <number />
										 <extension nil="true" />
										 <created-by>
												<id type="integer">7</id>
												<login>ejohnson</login>
												<email>upgrade+ej@coupa.com</email>
												<employee-number />
												<firstname>Ellis (Marketing Lead)</firstname>
												<lastname>Johnson</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-mobile>
									<phone-fax>
										 <id type="integer">69</id>
										 <created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
										 <updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code nil="true" />
										 <number />
										 <extension nil="true" />
										 <created-by>
												<id type="integer">7</id>
												<login>ejohnson</login>
												<email>upgrade+ej@coupa.com</email>
												<employee-number />
												<firstname>Ellis (Marketing Lead)</firstname>
												<lastname>Johnson</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-fax>
									<created-by>
										 <id type="integer">7</id>
										 <login>ejohnson</login>
										 <email>upgrade+ej@coupa.com</email>
										 <employee-number />
										 <firstname>Ellis (Marketing Lead)</firstname>
										 <lastname>Johnson</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </primary-contact>
							 <primary-address>
									<id type="integer">32</id>
									<created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
									<updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
									<name>Cheung Catering</name>
									<street1>2516 Pacific Coast Hwy</street1>
									<street2 />
									<city>Hermosa Beach</city>
									<state>CA</state>
									<postal-code>90254</postal-code>
									<attention nil="true" />
									<active type="boolean">true</active>
									<country>
										 <id type="integer">223</id>
										 <code>US</code>
										 <name>United States</name>
									</country>
									<created-by>
										 <id type="integer">7</id>
										 <login>ejohnson</login>
										 <email>upgrade+ej@coupa.com</email>
										 <employee-number />
										 <firstname>Ellis (Marketing Lead)</firstname>
										 <lastname>Johnson</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </primary-address>
						</supplier>
						<payment-term>
							 <id type="integer">3</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>2/10 Net 30</code>
							 <description />
							 <days-for-net-payment type="integer">30</days-for-net-payment>
							 <days-for-discount-payment type="integer">10</days-for-discount-payment>
							 <discount-rate type="float">2.0</discount-rate>
							 <active type="boolean">true</active>
						</payment-term>
						<shipping-term>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>Standard</code>
						</shipping-term>
						<asset-tags type="array" />
						<attachments type="array" />
						<created-by>
							 <id type="integer">7</id>
							 <login>ejohnson</login>
							 <email>upgrade+ej@coupa.com</email>
							 <employee-number />
							 <firstname>Ellis (Marketing Lead)</firstname>
							 <lastname>Johnson</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</created-by>
						<updated-by>
							 <id type="integer">7</id>
							 <login>ejohnson</login>
							 <email>upgrade+ej@coupa.com</email>
							 <employee-number />
							 <firstname>Ellis (Marketing Lead)</firstname>
							 <lastname>Johnson</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</updated-by>
				 </requisition-line>
			</requisition-lines>
			<approvals type="array">
				 <approval>
						<id type="integer">480</id>
						<created-at nil="true" />
						<updated-at nil="true" />
						<position type="integer">1</position>
						<approval-chain-id nil="true" />
						<status>pending_approval</status>
						<approval-date nil="true" />
						<note nil="true" />
						<type>ManagementHierarchyApproval</type>
						<approvable-type>RequisitionHeader</approvable-type>
						<approvable-id type="integer">97</approvable-id>
						<approver>
							 <id type="integer">6</id>
							 <login>bhostler</login>
							 <email>upgrade+bh@coupa.com</email>
							 <employee-number />
							 <firstname>Blair (Marketing VP)</firstname>
							 <lastname>Hostler</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</approver>
				 </approval>
			</approvals>
			<created-by>
				 <id type="integer">7</id>
				 <login>ejohnson</login>
				 <email>upgrade+ej@coupa.com</email>
				 <employee-number />
				 <firstname>Ellis (Marketing Lead)</firstname>
				 <lastname>Johnson</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</created-by>
			<updated-by>
				 <id type="integer">7</id>
				 <login>ejohnson</login>
				 <email>upgrade+ej@coupa.com</email>
				 <employee-number />
				 <firstname>Ellis (Marketing Lead)</firstname>
				 <lastname>Johnson</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</updated-by>
	 </requisition-header>
	 <requisition-header>
			<id type="integer">99</id>
			<created-at type="datetime">2009-04-27T09:41:52-07:00</created-at>
			<updated-at type="datetime">2009-05-11T11:39:23-07:00</updated-at>
			<buyer-note nil="true" />
			<justification>Blair -this is for the Q2 marketing offsite you wanted me to setup.	I kept it under 25k so it fits within your budget.</justification>
			<need-by-date nil="true" />
			<reject-reason-comment nil="true" />
			<status>ordered</status>
			<submitted-at type="datetime">2009-05-11T11:38:58-07:00</submitted-at>
			<exported type="boolean">false</exported>
			<ship-to-attention>Ellis (Marketing Lead) Johnson</ship-to-attention>
			<total type="decimal">22500.00</total>
			<height-passthrough />
			<custom-attach />
			<custom-field-3 />
			<currency>
				 <id type="integer">1</id>
				 <code>USD</code>
			</currency>
			<department>
				 <id type="integer">1</id>
				 <created-at type="datetime">2008-10-27T13:00:48-07:00</created-at>
				 <updated-at type="datetime">2009-05-04T18:20:29-07:00</updated-at>
				 <name>Marketing</name>
				 <active type="boolean">true</active>
				 <created-by>
						<id type="integer">1</id>
						<login>coupasupport</login>
						<email>robert.monahon+feardemo@coupa.com</email>
						<employee-number />
						<firstname>Coupa</firstname>
						<lastname>Support</lastname>
						<salesforce-id nil="true" />
						<height />
				 </created-by>
				 <updated-by>
						<id type="integer">16</id>
						<login>administrator</login>
						<email>jonathan.fear@coupa.com</email>
						<employee-number />
						<firstname>Kyle</firstname>
						<lastname>Eisner</lastname>
						<salesforce-id nil="true" />
						<height>hello,,,,</height>
				 </updated-by>
			</department>
			<requested-by>
				 <id type="integer">7</id>
				 <login>ejohnson</login>
				 <email>upgrade+ej@coupa.com</email>
				 <employee-number />
				 <firstname>Ellis (Marketing Lead)</firstname>
				 <lastname>Johnson</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</requested-by>
			<ship-to-address>
				 <id type="integer">16</id>
				 <created-at type="datetime">2008-10-27T13:00:19-07:00</created-at>
				 <updated-at type="datetime">2009-07-11T13:33:25-07:00</updated-at>
				 <name>HQ</name>
				 <street1>28 Nevada Blvd</street1>
				 <street2 />
				 <city>Laughlin</city>
				 <state>NV</state>
				 <postal-code>89028</postal-code>
				 <attention />
				 <active type="boolean">true</active>
				 <country>
						<id type="integer">223</id>
						<code>US</code>
						<name>United States</name>
				 </country>
				 <created-by>
						<id type="integer">1</id>
						<login>coupasupport</login>
						<email>robert.monahon+feardemo@coupa.com</email>
						<employee-number />
						<firstname>Coupa</firstname>
						<lastname>Support</lastname>
						<salesforce-id nil="true" />
						<height />
				 </created-by>
				 <updated-by>
						<id type="integer">16</id>
						<login>administrator</login>
						<email>jonathan.fear@coupa.com</email>
						<employee-number />
						<firstname>Kyle</firstname>
						<lastname>Eisner</lastname>
						<salesforce-id nil="true" />
						<height>hello,,,,</height>
				 </updated-by>
			</ship-to-address>
			<attachments type="array" />
			<requisition-lines type="array">
				 <requisition-line>
						<id type="integer">219</id>
						<created-at type="datetime">2009-05-10T21:22:32-07:00</created-at>
						<updated-at type="datetime">2009-05-11T11:39:19-07:00</updated-at>
						<description>Facility Rental for Q2 Marketing Offsite</description>
						<line-num type="integer">1</line-num>
						<need-by-date type="datetime">2009-05-11T00:00:00-07:00</need-by-date>
						<order-line-id type="integer">127</order-line-id>
						<quantity type="float">8.0</quantity>
						<source-part-num />
						<status nil="true" />
						<sub-line-num nil="true" />
						<supp-aux-part-num nil="true" />
						<total type="decimal">16000.00</total>
						<source-type>Non-Catalog Request</source-type>
						<line-type>RequisitionQuantityLine</line-type>
						<unit-price type="decimal">2000.00</unit-price>
						<account>
							 <id type="integer">182</id>
							 <created-at type="datetime">2009-05-10T21:22:32-07:00</created-at>
							 <updated-at type="datetime">2009-06-29T19:38:09-07:00</updated-at>
							 <name nil="true" />
							 <code>HQ-Marketing-Events</code>
							 <active type="boolean">false</active>
							 <segment-1>HQ</segment-1>
							 <segment-2>Marketing</segment-2>
							 <segment-3>Events</segment-3>
							 <segment-4 nil="true" />
							 <segment-5 nil="true" />
							 <segment-6 nil="true" />
							 <segment-7 nil="true" />
							 <segment-8 nil="true" />
							 <segment-9 nil="true" />
							 <segment-10 nil="true" />
							 <segment-11 nil="true" />
							 <segment-12 nil="true" />
							 <segment-13 nil="true" />
							 <segment-14 nil="true" />
							 <segment-15 nil="true" />
							 <segment-16 nil="true" />
							 <segment-17 nil="true" />
							 <segment-18 nil="true" />
							 <segment-19 nil="true" />
							 <segment-20 nil="true" />
							 <account-type>
									<id type="integer">1</id>
									<created-at type="datetime">2008-10-27T13:10:01-07:00</created-at>
									<updated-at type="datetime">2011-09-01T11:57:27-07:00</updated-at>
									<name>Ace Corporate</name>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </account-type>
							 <created-by>
									<id type="integer">7</id>
									<login>ejohnson</login>
									<email>upgrade+ej@coupa.com</email>
									<employee-number />
									<firstname>Ellis (Marketing Lead)</firstname>
									<lastname>Johnson</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">16</id>
									<login>administrator</login>
									<email>jonathan.fear@coupa.com</email>
									<employee-number />
									<firstname>Kyle</firstname>
									<lastname>Eisner</lastname>
									<salesforce-id nil="true" />
									<height>hello,,,,</height>
							 </updated-by>
						</account>
						<account-allocations type="array" />
						<commodity>
							 <id type="integer">5</id>
							 <created-at type="datetime">2008-10-27T13:04:00-07:00</created-at>
							 <updated-at type="datetime">2011-08-25T06:43:41-07:00</updated-at>
							 <active type="boolean">true</active>
							 <name>Facilities</name>
							 <acct>98765</acct>
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</commodity>
						<currency>
							 <id type="integer">1</id>
							 <code>USD</code>
						</currency>
						<supplier>
							 <id type="integer">19</id>
							 <name>Metro Gateway Center</name>
							 <number>233434</number>
							 <supplier-diversity />
							 <primary-contact>
									<id type="integer">20</id>
									<created-at type="datetime">2009-05-04T18:08:08-07:00</created-at>
									<updated-at type="datetime">2009-05-04T18:08:08-07:00</updated-at>
									<email>regus.berry@metro.com</email>
									<name-prefix nil="true" />
									<name-suffix nil="true" />
									<name-additional nil="true" />
									<name-given>Regus</name-given>
									<name-family>Berry</name-family>
									<name-fullname nil="true" />
									<notes nil="true" />
									<phone-work>
										 <id type="integer">47</id>
										 <created-at type="datetime">2009-05-04T18:08:08-07:00</created-at>
										 <updated-at type="datetime">2009-05-04T18:08:08-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code>650</area-code>
										 <number>2321991</number>
										 <extension nil="true" />
										 <created-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-work>
									<phone-mobile>
										 <id type="integer">48</id>
										 <created-at type="datetime">2009-05-04T18:08:08-07:00</created-at>
										 <updated-at type="datetime">2009-05-04T18:08:08-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code nil="true" />
										 <number />
										 <extension nil="true" />
										 <created-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-mobile>
									<phone-fax>
										 <id type="integer">49</id>
										 <created-at type="datetime">2009-05-04T18:08:08-07:00</created-at>
										 <updated-at type="datetime">2009-05-04T18:08:08-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code nil="true" />
										 <number />
										 <extension nil="true" />
										 <created-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-fax>
									<created-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </primary-contact>
							 <primary-address>
									<id type="integer">26</id>
									<created-at type="datetime">2009-05-04T18:08:09-07:00</created-at>
									<updated-at type="datetime">2009-05-04T18:08:09-07:00</updated-at>
									<name>Metro Gateway Center</name>
									<street1>239 Blizzard Drive</street1>
									<street2 />
									<city>San Francisco</city>
									<state>CA</state>
									<postal-code>92302</postal-code>
									<attention nil="true" />
									<active type="boolean">true</active>
									<country>
										 <id type="integer">223</id>
										 <code>US</code>
										 <name>United States</name>
									</country>
									<created-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </primary-address>
						</supplier>
						<uom>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>EA</code>
							 <name>Each</name>
							 <allowable-precision type="integer">0</allowable-precision>
							 <active type="boolean">true</active>
						</uom>
						<payment-term>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>Net 30</code>
							 <description />
							 <days-for-net-payment type="integer">30</days-for-net-payment>
							 <days-for-discount-payment nil="true" />
							 <discount-rate nil="true" />
							 <active type="boolean">true</active>
						</payment-term>
						<shipping-term>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>Standard</code>
						</shipping-term>
						<asset-tags type="array" />
						<attachments type="array" />
						<created-by>
							 <id type="integer">7</id>
							 <login>ejohnson</login>
							 <email>upgrade+ej@coupa.com</email>
							 <employee-number />
							 <firstname>Ellis (Marketing Lead)</firstname>
							 <lastname>Johnson</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</created-by>
						<updated-by>
							 <id type="integer">6</id>
							 <login>bhostler</login>
							 <email>upgrade+bh@coupa.com</email>
							 <employee-number />
							 <firstname>Blair (Marketing VP)</firstname>
							 <lastname>Hostler</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</updated-by>
				 </requisition-line>
				 <requisition-line>
						<id type="integer">222</id>
						<created-at type="datetime">2009-05-10T21:35:45-07:00</created-at>
						<updated-at type="datetime">2009-05-11T11:39:21-07:00</updated-at>
						<description>Catering and Cleaning services for Q2 Marketing Offiste</description>
						<line-num type="integer">2</line-num>
						<need-by-date type="datetime">2009-05-11T00:00:00-07:00</need-by-date>
						<order-line-id type="integer">128</order-line-id>
						<source-part-num />
						<status nil="true" />
						<sub-line-num nil="true" />
						<supp-aux-part-num nil="true" />
						<total type="decimal">6500.00</total>
						<source-type>Non-Catalog Request</source-type>
						<line-type>RequisitionAmountLine</line-type>
						<unit-price type="decimal">6500.00</unit-price>
						<account>
							 <id type="integer">182</id>
							 <created-at type="datetime">2009-05-10T21:22:32-07:00</created-at>
							 <updated-at type="datetime">2009-06-29T19:38:09-07:00</updated-at>
							 <name nil="true" />
							 <code>HQ-Marketing-Events</code>
							 <active type="boolean">false</active>
							 <segment-1>HQ</segment-1>
							 <segment-2>Marketing</segment-2>
							 <segment-3>Events</segment-3>
							 <segment-4 nil="true" />
							 <segment-5 nil="true" />
							 <segment-6 nil="true" />
							 <segment-7 nil="true" />
							 <segment-8 nil="true" />
							 <segment-9 nil="true" />
							 <segment-10 nil="true" />
							 <segment-11 nil="true" />
							 <segment-12 nil="true" />
							 <segment-13 nil="true" />
							 <segment-14 nil="true" />
							 <segment-15 nil="true" />
							 <segment-16 nil="true" />
							 <segment-17 nil="true" />
							 <segment-18 nil="true" />
							 <segment-19 nil="true" />
							 <segment-20 nil="true" />
							 <account-type>
									<id type="integer">1</id>
									<created-at type="datetime">2008-10-27T13:10:01-07:00</created-at>
									<updated-at type="datetime">2011-09-01T11:57:27-07:00</updated-at>
									<name>Ace Corporate</name>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </account-type>
							 <created-by>
									<id type="integer">7</id>
									<login>ejohnson</login>
									<email>upgrade+ej@coupa.com</email>
									<employee-number />
									<firstname>Ellis (Marketing Lead)</firstname>
									<lastname>Johnson</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">16</id>
									<login>administrator</login>
									<email>jonathan.fear@coupa.com</email>
									<employee-number />
									<firstname>Kyle</firstname>
									<lastname>Eisner</lastname>
									<salesforce-id nil="true" />
									<height>hello,,,,</height>
							 </updated-by>
						</account>
						<account-allocations type="array" />
						<commodity>
							 <id type="integer">5</id>
							 <created-at type="datetime">2008-10-27T13:04:00-07:00</created-at>
							 <updated-at type="datetime">2011-08-25T06:43:41-07:00</updated-at>
							 <active type="boolean">true</active>
							 <name>Facilities</name>
							 <acct>98765</acct>
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</commodity>
						<currency>
							 <id type="integer">1</id>
							 <code>USD</code>
						</currency>
						<supplier>
							 <id type="integer">24</id>
							 <name>Cheung Catering</name>
							 <number nil="true" />
							 <supplier-diversity />
							 <primary-contact>
									<id type="integer">26</id>
									<created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
									<updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
									<email />
									<name-prefix nil="true" />
									<name-suffix nil="true" />
									<name-additional nil="true" />
									<name-given>Conway</name-given>
									<name-family>Cheung</name-family>
									<name-fullname nil="true" />
									<notes nil="true" />
									<phone-work>
										 <id type="integer">67</id>
										 <created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
										 <updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code nil="true" />
										 <number />
										 <extension nil="true" />
										 <created-by>
												<id type="integer">7</id>
												<login>ejohnson</login>
												<email>upgrade+ej@coupa.com</email>
												<employee-number />
												<firstname>Ellis (Marketing Lead)</firstname>
												<lastname>Johnson</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-work>
									<phone-mobile>
										 <id type="integer">68</id>
										 <created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
										 <updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code nil="true" />
										 <number />
										 <extension nil="true" />
										 <created-by>
												<id type="integer">7</id>
												<login>ejohnson</login>
												<email>upgrade+ej@coupa.com</email>
												<employee-number />
												<firstname>Ellis (Marketing Lead)</firstname>
												<lastname>Johnson</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-mobile>
									<phone-fax>
										 <id type="integer">69</id>
										 <created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
										 <updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code nil="true" />
										 <number />
										 <extension nil="true" />
										 <created-by>
												<id type="integer">7</id>
												<login>ejohnson</login>
												<email>upgrade+ej@coupa.com</email>
												<employee-number />
												<firstname>Ellis (Marketing Lead)</firstname>
												<lastname>Johnson</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-fax>
									<created-by>
										 <id type="integer">7</id>
										 <login>ejohnson</login>
										 <email>upgrade+ej@coupa.com</email>
										 <employee-number />
										 <firstname>Ellis (Marketing Lead)</firstname>
										 <lastname>Johnson</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </primary-contact>
							 <primary-address>
									<id type="integer">32</id>
									<created-at type="datetime">2008-12-09T12:56:47-08:00</created-at>
									<updated-at type="datetime">2009-08-13T14:30:23-07:00</updated-at>
									<name>Cheung Catering</name>
									<street1>2516 Pacific Coast Hwy</street1>
									<street2 />
									<city>Hermosa Beach</city>
									<state>CA</state>
									<postal-code>90254</postal-code>
									<attention nil="true" />
									<active type="boolean">true</active>
									<country>
										 <id type="integer">223</id>
										 <code>US</code>
										 <name>United States</name>
									</country>
									<created-by>
										 <id type="integer">7</id>
										 <login>ejohnson</login>
										 <email>upgrade+ej@coupa.com</email>
										 <employee-number />
										 <firstname>Ellis (Marketing Lead)</firstname>
										 <lastname>Johnson</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </primary-address>
						</supplier>
						<payment-term>
							 <id type="integer">3</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>2/10 Net 30</code>
							 <description />
							 <days-for-net-payment type="integer">30</days-for-net-payment>
							 <days-for-discount-payment type="integer">10</days-for-discount-payment>
							 <discount-rate type="float">2.0</discount-rate>
							 <active type="boolean">true</active>
						</payment-term>
						<shipping-term>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>Standard</code>
						</shipping-term>
						<asset-tags type="array" />
						<attachments type="array" />
						<created-by>
							 <id type="integer">7</id>
							 <login>ejohnson</login>
							 <email>upgrade+ej@coupa.com</email>
							 <employee-number />
							 <firstname>Ellis (Marketing Lead)</firstname>
							 <lastname>Johnson</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</created-by>
						<updated-by>
							 <id type="integer">6</id>
							 <login>bhostler</login>
							 <email>upgrade+bh@coupa.com</email>
							 <employee-number />
							 <firstname>Blair (Marketing VP)</firstname>
							 <lastname>Hostler</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</updated-by>
				 </requisition-line>
			</requisition-lines>
			<approvals type="array">
				 <approval>
						<id type="integer">562</id>
						<created-at nil="true" />
						<updated-at nil="true" />
						<position type="integer">1</position>
						<approval-chain-id nil="true" />
						<status>approved</status>
						<approval-date type="datetime">2009-05-11T11:39:19-07:00</approval-date>
						<note nil="true" />
						<type>ManagementHierarchyApproval</type>
						<approvable-type>RequisitionHeader</approvable-type>
						<approvable-id type="integer">99</approvable-id>
						<approver>
							 <id type="integer">6</id>
							 <login>bhostler</login>
							 <email>upgrade+bh@coupa.com</email>
							 <employee-number />
							 <firstname>Blair (Marketing VP)</firstname>
							 <lastname>Hostler</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</approver>
				 </approval>
			</approvals>
			<created-by>
				 <id type="integer">7</id>
				 <login>ejohnson</login>
				 <email>upgrade+ej@coupa.com</email>
				 <employee-number />
				 <firstname>Ellis (Marketing Lead)</firstname>
				 <lastname>Johnson</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</created-by>
			<updated-by>
				 <id type="integer">6</id>
				 <login>bhostler</login>
				 <email>upgrade+bh@coupa.com</email>
				 <employee-number />
				 <firstname>Blair (Marketing VP)</firstname>
				 <lastname>Hostler</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</updated-by>
	 </requisition-header>
</requisition-headers>

Exemple de demande d'achat - Demande d'achat dont le statut est Commandé, créée dans une fourchette de dates

Dans cet exemple, nous recherchons des demandes dont le statut est Commandé et qui ont été créées entre deux dates.

Nous avons deux méthodes pour interroger cet enregistrement. Nous pouvons utiliser :

  • HTTP GET https://<instance>.coupahost.com/api/requisitions?status=<status>&created-at[gt]=<date>&created-at[lt]=<date>
    Dans ce cas https://<instance>.coupahost.com/api/requisitions?status=ordered&created-at[gt]=2010-01-01&created-at[lt]=2010-02-01 
<?xml version="1.0" encoding="UTF-8"?>
<requisition-headers type="array">
	 <requisition-header>
			<id type="integer">187</id>
			<created-at type="datetime">2010-01-06T13:26:54-08:00</created-at>
			<updated-at type="datetime">2010-02-09T10:26:39-08:00</updated-at>
			<buyer-note nil="true" />
			<justification />
			<need-by-date nil="true" />
			<reject-reason-comment nil="true" />
			<status>ordered</status>
			<submitted-at type="datetime">2010-02-09T10:26:14-08:00</submitted-at>
			<exported type="boolean">false</exported>
			<ship-to-attention>Blair (Marketing VP) Hostler</ship-to-attention>
			<total type="decimal">750.00</total>
			<height-passthrough />
			<custom-attach />
			<custom-field-3 />
			<currency>
				 <id type="integer">1</id>
				 <code>USD</code>
			</currency>
			<department>
				 <id type="integer">1</id>
				 <created-at type="datetime">2008-10-27T13:00:48-07:00</created-at>
				 <updated-at type="datetime">2009-05-04T18:20:29-07:00</updated-at>
				 <name>Marketing</name>
				 <active type="boolean">true</active>
				 <created-by>
						<id type="integer">1</id>
						<login>coupasupport</login>
						<email>robert.monahon+feardemo@coupa.com</email>
						<employee-number />
						<firstname>Coupa</firstname>
						<lastname>Support</lastname>
						<salesforce-id nil="true" />
						<height />
				 </created-by>
				 <updated-by>
						<id type="integer">16</id>
						<login>administrator</login>
						<email>jonathan.fear@coupa.com</email>
						<employee-number />
						<firstname>Kyle</firstname>
						<lastname>Eisner</lastname>
						<salesforce-id nil="true" />
						<height>hello,,,,</height>
				 </updated-by>
			</department>
			<requested-by>
				 <id type="integer">6</id>
				 <login>bhostler</login>
				 <email>upgrade+bh@coupa.com</email>
				 <employee-number />
				 <firstname>Blair (Marketing VP)</firstname>
				 <lastname>Hostler</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</requested-by>
			<ship-to-address>
				 <id type="integer">16</id>
				 <created-at type="datetime">2008-10-27T13:00:19-07:00</created-at>
				 <updated-at type="datetime">2009-07-11T13:33:25-07:00</updated-at>
				 <name>HQ</name>
				 <street1>28 Nevada Blvd</street1>
				 <street2 />
				 <city>Laughlin</city>
				 <state>NV</state>
				 <postal-code>89028</postal-code>
				 <attention />
				 <active type="boolean">true</active>
				 <country>
						<id type="integer">223</id>
						<code>US</code>
						<name>United States</name>
				 </country>
				 <created-by>
						<id type="integer">1</id>
						<login>coupasupport</login>
						<email>robert.monahon+feardemo@coupa.com</email>
						<employee-number />
						<firstname>Coupa</firstname>
						<lastname>Support</lastname>
						<salesforce-id nil="true" />
						<height />
				 </created-by>
				 <updated-by>
						<id type="integer">16</id>
						<login>administrator</login>
						<email>jonathan.fear@coupa.com</email>
						<employee-number />
						<firstname>Kyle</firstname>
						<lastname>Eisner</lastname>
						<salesforce-id nil="true" />
						<height>hello,,,,</height>
				 </updated-by>
			</ship-to-address>
			<attachments type="array" />
			<requisition-lines type="array">
				 <requisition-line>
						<id type="integer">588</id>
						<created-at type="datetime">2010-02-09T10:25:56-08:00</created-at>
						<updated-at type="datetime">2010-02-09T10:26:37-08:00</updated-at>
						<description>Ads</description>
						<line-num type="integer">1</line-num>
						<need-by-date nil="true" />
						<order-line-id type="integer">340</order-line-id>
						<quantity type="float">1.0</quantity>
						<source-part-num nil="true" />
						<status>draft</status>
						<sub-line-num nil="true" />
						<supp-aux-part-num nil="true" />
						<total type="decimal">750.00</total>
						<source-type>Web Form</source-type>
						<line-type>RequisitionQuantityLine</line-type>
						<unit-price type="decimal">750.00</unit-price>
						<account>
							 <id type="integer">14</id>
							 <created-at type="datetime">2008-10-27T13:20:36-07:00</created-at>
							 <updated-at type="datetime">2011-09-22T16:25:23-07:00</updated-at>
							 <name>San Francisco -Marketing, Assets</name>
							 <code>SF-Marketing-Assets</code>
							 <active type="boolean">true</active>
							 <segment-1>SF</segment-1>
							 <segment-2>Marketing</segment-2>
							 <segment-3>Assets</segment-3>
							 <segment-4 />
							 <segment-5 />
							 <segment-6 />
							 <segment-7 />
							 <segment-8 />
							 <segment-9 />
							 <segment-10 />
							 <segment-11 />
							 <segment-12 />
							 <segment-13 />
							 <segment-14 />
							 <segment-15 />
							 <segment-16 />
							 <segment-17 />
							 <segment-18 />
							 <segment-19 />
							 <segment-20 />
							 <account-type>
									<id type="integer">1</id>
									<created-at type="datetime">2008-10-27T13:10:01-07:00</created-at>
									<updated-at type="datetime">2011-09-01T11:57:27-07:00</updated-at>
									<name>Ace Corporate</name>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">16</id>
										 <login>administrator</login>
										 <email>jonathan.fear@coupa.com</email>
										 <employee-number />
										 <firstname>Kyle</firstname>
										 <lastname>Eisner</lastname>
										 <salesforce-id nil="true" />
										 <height>hello,,,,</height>
									</updated-by>
							 </account-type>
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">17</id>
									<login>coupa_metrics_gatherer</login>
									<email>do_not_reply_metrics@coupa.com</email>
									<employee-number nil="true" />
									<firstname>Coupa</firstname>
									<lastname>Metrics</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</account>
						<account-allocations type="array" />
						<currency>
							 <id type="integer">1</id>
							 <code>USD</code>
						</currency>
						<form-response type="array">
							 <prompt-response>
									<responses type="array">
										 <response>Advertising</response>
									</responses>
									<prompt>Type of Marketing Request</prompt>
							 </prompt-response>
							 <prompt-response>
									<responses type="array">
										 <response>Ad in Local papers</response>
									</responses>
									<prompt>Description</prompt>
							 </prompt-response>
						</form-response>
						<supplier>
							 <id type="integer">15</id>
							 <name>Omniture Marketing Services</name>
							 <number nil="true" />
							 <supplier-diversity />
							 <primary-contact>
									<id type="integer">16</id>
									<created-at type="datetime">2008-10-27T14:04:45-07:00</created-at>
									<updated-at type="datetime">2008-10-27T14:04:45-07:00</updated-at>
									<email>upgrade@coupa.com</email>
									<name-prefix nil="true" />
									<name-suffix nil="true" />
									<name-additional nil="true" />
									<name-given>Brad</name-given>
									<name-family>Franklin</name-family>
									<name-fullname nil="true" />
									<notes nil="true" />
									<phone-work>
										 <id type="integer">16</id>
										 <created-at type="datetime">2008-10-27T14:04:45-07:00</created-at>
										 <updated-at type="datetime">2009-08-12T17:01:02-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code>650</area-code>
										 <number>5856306</number>
										 <extension nil="true" />
										 <created-by>
												<id type="integer">1</id>
												<login>coupasupport</login>
												<email>robert.monahon+feardemo@coupa.com</email>
												<employee-number />
												<firstname>Coupa</firstname>
												<lastname>Support</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-work>
									<phone-mobile>
										 <id type="integer">17</id>
										 <created-at type="datetime">2008-10-27T14:04:45-07:00</created-at>
										 <updated-at type="datetime">2009-08-12T17:01:02-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code>650</area-code>
										 <number>5856306</number>
										 <extension nil="true" />
										 <created-by>
												<id type="integer">1</id>
												<login>coupasupport</login>
												<email>robert.monahon+feardemo@coupa.com</email>
												<employee-number />
												<firstname>Coupa</firstname>
												<lastname>Support</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-mobile>
									<phone-fax>
										 <id type="integer">18</id>
										 <created-at type="datetime">2008-10-27T14:04:45-07:00</created-at>
										 <updated-at type="datetime">2009-08-12T17:01:02-07:00</updated-at>
										 <country-code>1</country-code>
										 <area-code>650</area-code>
										 <number>5856306</number>
										 <extension nil="true" />
										 <created-by>
												<id type="integer">1</id>
												<login>coupasupport</login>
												<email>robert.monahon+feardemo@coupa.com</email>
												<employee-number />
												<firstname>Coupa</firstname>
												<lastname>Support</lastname>
												<salesforce-id nil="true" />
												<height />
										 </created-by>
										 <updated-by>
												<id type="integer">16</id>
												<login>administrator</login>
												<email>jonathan.fear@coupa.com</email>
												<employee-number />
												<firstname>Kyle</firstname>
												<lastname>Eisner</lastname>
												<salesforce-id nil="true" />
												<height>hello,,,,</height>
										 </updated-by>
									</phone-fax>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </primary-contact>
							 <primary-address>
									<id type="integer">19</id>
									<created-at type="datetime">2008-10-27T14:04:45-07:00</created-at>
									<updated-at type="datetime">2008-10-27T14:04:45-07:00</updated-at>
									<name>Omniture Marketing Services</name>
									<street1>2200 Old Germantown Road</street1>
									<street2 />
									<city>Redwood City</city>
									<state>CA</state>
									<postal-code>94402</postal-code>
									<attention nil="true" />
									<active type="boolean">true</active>
									<country>
										 <id type="integer">223</id>
										 <code>US</code>
										 <name>United States</name>
									</country>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </primary-address>
						</supplier>
						<uom>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>EA</code>
							 <name>Each</name>
							 <allowable-precision type="integer">0</allowable-precision>
							 <active type="boolean">true</active>
						</uom>
						<payment-term>
							 <id type="integer">3</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>2/10 Net 30</code>
							 <description />
							 <days-for-net-payment type="integer">30</days-for-net-payment>
							 <days-for-discount-payment type="integer">10</days-for-discount-payment>
							 <discount-rate type="float">2.0</discount-rate>
							 <active type="boolean">true</active>
						</payment-term>
						<shipping-term>
							 <id type="integer">1</id>
							 <created-at nil="true" />
							 <updated-at nil="true" />
							 <code>Standard</code>
						</shipping-term>
						<asset-tags type="array" />
						<attachments type="array" />
						<created-by>
							 <id type="integer">6</id>
							 <login>bhostler</login>
							 <email>upgrade+bh@coupa.com</email>
							 <employee-number />
							 <firstname>Blair (Marketing VP)</firstname>
							 <lastname>Hostler</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</created-by>
						<updated-by>
							 <id type="integer">2</id>
							 <login>mjordan</login>
							 <email>upgrade+mj@coupa.com</email>
							 <employee-number />
							 <firstname>Meg (CEO)</firstname>
							 <lastname>Jordan</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</updated-by>
				 </requisition-line>
			</requisition-lines>
			<approvals type="array">
				 <approval>
						<id type="integer">1704</id>
						<created-at nil="true" />
						<updated-at nil="true" />
						<position type="integer">1</position>
						<approval-chain-id nil="true" />
						<status>approved</status>
						<approval-date type="datetime">2010-02-09T10:26:37-08:00</approval-date>
						<note nil="true" />
						<type>ManagementHierarchyApproval</type>
						<approvable-type>RequisitionHeader</approvable-type>
						<approvable-id type="integer">187</approvable-id>
						<approver>
							 <id type="integer">2</id>
							 <login>mjordan</login>
							 <email>upgrade+mj@coupa.com</email>
							 <employee-number />
							 <firstname>Meg (CEO)</firstname>
							 <lastname>Jordan</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</approver>
				 </approval>
			</approvals>
			<created-by>
				 <id type="integer">6</id>
				 <login>bhostler</login>
				 <email>upgrade+bh@coupa.com</email>
				 <employee-number />
				 <firstname>Blair (Marketing VP)</firstname>
				 <lastname>Hostler</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</created-by>
			<updated-by>
				 <id type="integer">2</id>
				 <login>mjordan</login>
				 <email>upgrade+mj@coupa.com</email>
				 <employee-number />
				 <firstname>Meg (CEO)</firstname>
				 <lastname>Jordan</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</updated-by>
	 </requisition-header>
</requisition-headers>

Exemple de requête de demandes - Demande spécifique à la requête

Dans cet exemple, nous recherchons une demande #235. Il s'agit du numéro Coupa généré automatiquement pour cette demande et il sert également d'ID Coupa pour cet enregistrement.

Nous avons deux méthodes pour interroger cet enregistrement. Nous pouvons utiliser :

  • Format 1 : https://<instance>.coupahost.com/api/requisitions/<id>
    Dans ce cas https://<instance>.coupahost.com/api/requisitions/235
    La sortie est affichée ci-dessous.
  • Format 2 : https://<instance>.coupahost.com/api/requisitions?id=<id>
    Dans ce cas https://<instance>.coupahost.com/api/requisitions?id=235
    Il y a une légère différence dans la sortie utilisant ce format.  Le<requisition-header>marqueur affiché ci-dessous ne sera pas l'élément racine.  Au lieu de cela, il se trouve dans un <requisition-headers type="array"> 
<?xml version="1.0" encoding="UTF-8"?>
<requisition-header>
	 <id type="integer">235</id>
	 <created-at type="datetime">2010-02-06T19:03:50-08:00</created-at>
	 <updated-at type="datetime">2010-02-06T19:07:50-08:00</updated-at>
	 <buyer-note nil="true" />
	 <justification />
	 <need-by-date nil="true" />
	 <reject-reason-comment nil="true" />
	 <status>ordered</status>
	 <submitted-at type="datetime">2010-02-06T19:05:25-08:00</submitted-at>
	 <exported type="boolean">false</exported>
	 <ship-to-attention>Ellis (Marketing Lead) Johnson</ship-to-attention>
	 <total type="decimal">22.56</total>
	 <height-passthrough />
	 <custom-attach />
	 <custom-field-3 />
	 <currency>
			<id type="integer">1</id>
			<code>USD</code>
	 </currency>
	 <department>
			<id type="integer">1</id>
			<created-at type="datetime">2008-10-27T13:00:48-07:00</created-at>
			<updated-at type="datetime">2009-05-04T18:20:29-07:00</updated-at>
			<name>Marketing</name>
			<active type="boolean">true</active>
			<created-by>
				 <id type="integer">1</id>
				 <login>coupasupport</login>
				 <email>robert.monahon+feardemo@coupa.com</email>
				 <employee-number />
				 <firstname>Coupa</firstname>
				 <lastname>Support</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</created-by>
			<updated-by>
				 <id type="integer">16</id>
				 <login>administrator</login>
				 <email>jonathan.fear@coupa.com</email>
				 <employee-number />
				 <firstname>Kyle</firstname>
				 <lastname>Eisner</lastname>
				 <salesforce-id nil="true" />
				 <height>hello,,,,</height>
			</updated-by>
	 </department>
	 <requested-by>
			<id type="integer">7</id>
			<login>ejohnson</login>
			<email>upgrade+ej@coupa.com</email>
			<employee-number />
			<firstname>Ellis (Marketing Lead)</firstname>
			<lastname>Johnson</lastname>
			<salesforce-id nil="true" />
			<height />
	 </requested-by>
	 <ship-to-address>
			<id type="integer">14</id>
			<created-at type="datetime">2008-10-27T12:58:55-07:00</created-at>
			<updated-at type="datetime">2010-03-23T21:03:22-07:00</updated-at>
			<name>San Francisco Office</name>
			<street1>150 Main Street</street1>
			<street2 />
			<city>San Francisco</city>
			<state>CA</state>
			<postal-code>94450</postal-code>
			<attention />
			<active type="boolean">true</active>
			<country>
				 <id type="integer">223</id>
				 <code>US</code>
				 <name>United States</name>
			</country>
			<created-by>
				 <id type="integer">1</id>
				 <login>coupasupport</login>
				 <email>robert.monahon+feardemo@coupa.com</email>
				 <employee-number />
				 <firstname>Coupa</firstname>
				 <lastname>Support</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</created-by>
			<updated-by>
				 <id type="integer">1</id>
				 <login>coupasupport</login>
				 <email>robert.monahon+feardemo@coupa.com</email>
				 <employee-number />
				 <firstname>Coupa</firstname>
				 <lastname>Support</lastname>
				 <salesforce-id nil="true" />
				 <height />
			</updated-by>
	 </ship-to-address>
	 <attachments type="array" />
	 <requisition-lines type="array">
			<requisition-line>
				 <id type="integer">573</id>
				 <created-at type="datetime">2010-02-06T19:05:12-08:00</created-at>
				 <updated-at type="datetime">2010-02-06T19:07:48-08:00</updated-at>
				 <description>Standard Battery, Battery Type Alkaline, Battery Size C, Voltage 1.5, Package Quantity 6</description>
				 <line-num type="integer">1</line-num>
				 <need-by-date nil="true" />
				 <order-line-id type="integer">330</order-line-id>
				 <quantity type="float">2.0</quantity>
				 <source-part-num>3WA31</source-part-num>
				 <status nil="true" />
				 <sub-line-num nil="true" />
				 <supp-aux-part-num>WWG3WA31</supp-aux-part-num>
				 <total type="decimal">22.56</total>
				 <source-type>Punchout</source-type>
				 <line-type>RequisitionQuantityLine</line-type>
				 <unit-price type="decimal">11.28</unit-price>
				 <account>
						<id type="integer">50</id>
						<created-at type="datetime">2009-05-04T17:45:26-07:00</created-at>
						<updated-at type="datetime">2009-05-05T23:23:31-07:00</updated-at>
						<name>San Francisco -Marketing, Marketing Services</name>
						<code>SF-Marketing-Marketing Services</code>
						<active type="boolean">true</active>
						<segment-1>SF</segment-1>
						<segment-2>Marketing</segment-2>
						<segment-3>Marketing Services</segment-3>
						<segment-4 />
						<segment-5 />
						<segment-6 />
						<segment-7 />
						<segment-8 />
						<segment-9 />
						<segment-10 />
						<segment-11 />
						<segment-12 />
						<segment-13 />
						<segment-14 />
						<segment-15 />
						<segment-16 />
						<segment-17 />
						<segment-18 />
						<segment-19 />
						<segment-20 />
						<account-type>
							 <id type="integer">1</id>
							 <created-at type="datetime">2008-10-27T13:10:01-07:00</created-at>
							 <updated-at type="datetime">2011-09-01T11:57:27-07:00</updated-at>
							 <name>Ace Corporate</name>
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">16</id>
									<login>administrator</login>
									<email>jonathan.fear@coupa.com</email>
									<employee-number />
									<firstname>Kyle</firstname>
									<lastname>Eisner</lastname>
									<salesforce-id nil="true" />
									<height>hello,,,,</height>
							 </updated-by>
						</account-type>
						<created-by>
							 <id type="integer">16</id>
							 <login>administrator</login>
							 <email>jonathan.fear@coupa.com</email>
							 <employee-number />
							 <firstname>Kyle</firstname>
							 <lastname>Eisner</lastname>
							 <salesforce-id nil="true" />
							 <height>hello,,,,</height>
						</created-by>
						<updated-by>
							 <id type="integer">10</id>
							 <login>amanning</login>
							 <email>upgrade+am@coupa.com</email>
							 <employee-number />
							 <firstname>Anna (AP Director)</firstname>
							 <lastname>Manning</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</updated-by>
				 </account>
				 <account-allocations type="array" />
				 <contract>
						<id type="integer">7</id>
						<created-at type="datetime">2009-04-16T19:09:26-07:00</created-at>
						<updated-at type="datetime">2010-02-17T14:56:47-08:00</updated-at>
						<name>Grainger</name>
						<number>5</number>
						<version nil="true" />
						<start-date type="datetime">2009-04-16T00:00:00-07:00</start-date>
						<end-date type="datetime">2010-04-16T00:00:00-07:00</end-date>
						<status>inactive</status>
						<minimum-value type="decimal">0.00</minimum-value>
						<maximum-value type="decimal">0.00</maximum-value>
						<terms nil="true" />
						<preferred nil="true" />
						<savings-pct type="decimal">8.0</savings-pct>
						<min-commit type="decimal">0.00</min-commit>
						<max-commit type="decimal">0.00</max-commit>
						<supplier-invoiceable type="boolean">false</supplier-invoiceable>
						<is-default type="boolean">false</is-default>
						<supplier>
							 <id type="integer">9</id>
							 <name>Grainger</name>
							 <number nil="true" />
							 <supplier-diversity />
							 <primary-contact>
									<id type="integer">9</id>
									<created-at type="datetime">2008-10-27T12:56:40-07:00</created-at>
									<updated-at type="datetime">2008-10-27T12:56:40-07:00</updated-at>
									<email>upgrade@coupa.com</email>
									<name-prefix nil="true" />
									<name-suffix nil="true" />
									<name-additional nil="true" />
									<name-given>Ben</name-given>
									<name-family>Miller</name-family>
									<name-fullname nil="true" />
									<notes nil="true" />
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </primary-contact>
							 <primary-address>
									<id type="integer">9</id>
									<created-at type="datetime">2008-10-27T12:56:40-07:00</created-at>
									<updated-at type="datetime">2008-10-27T12:56:40-07:00</updated-at>
									<name nil="true" />
									<street1>1 Grainger Road</street1>
									<street2 nil="true" />
									<city>Newark</city>
									<state>NJ</state>
									<postal-code>92321</postal-code>
									<attention nil="true" />
									<active type="boolean">true</active>
									<country>
										 <id type="integer">223</id>
										 <code>US</code>
										 <name>United States</name>
									</country>
									<created-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</created-by>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </primary-address>
						</supplier>
						<content-groups type="array">
							 <content-group>
									<id type="integer">1</id>
									<created-at type="datetime">2006-08-27T19:40:04-07:00</created-at>
									<updated-at type="datetime">2008-10-27T13:00:19-07:00</updated-at>
									<name>Global</name>
									<description>Default business group that all users have access to</description>
									<updated-by>
										 <id type="integer">1</id>
										 <login>coupasupport</login>
										 <email>robert.monahon+feardemo@coupa.com</email>
										 <employee-number />
										 <firstname>Coupa</firstname>
										 <lastname>Support</lastname>
										 <salesforce-id nil="true" />
										 <height />
									</updated-by>
							 </content-group>
						</content-groups>
						<created-by>
							 <id type="integer">1</id>
							 <login>coupasupport</login>
							 <email>robert.monahon+feardemo@coupa.com</email>
							 <employee-number />
							 <firstname>Coupa</firstname>
							 <lastname>Support</lastname>
							 <salesforce-id nil="true" />
							 <height />
						</created-by>
						<updated-by>
							 <id type="integer">16</id>
							 <login>administrator</login>
							 <email>jonathan.fear@coupa.com</email>
							 <employee-number />
							 <firstname>Kyle</firstname>
							 <lastname>Eisner</lastname>
							 <salesforce-id nil="true" />
							 <height>hello,,,,</height>
						</updated-by>
				 </contract>
				 <currency>
						<id type="integer">1</id>
						<code>USD</code>
				 </currency>
				 <supplier>
						<id type="integer">9</id>
						<name>Grainger</name>
						<number nil="true" />
						<supplier-diversity />
						<primary-contact>
							 <id type="integer">9</id>
							 <created-at type="datetime">2008-10-27T12:56:40-07:00</created-at>
							 <updated-at type="datetime">2008-10-27T12:56:40-07:00</updated-at>
							 <email>upgrade@coupa.com</email>
							 <name-prefix nil="true" />
							 <name-suffix nil="true" />
							 <name-additional nil="true" />
							 <name-given>Ben</name-given>
							 <name-family>Miller</name-family>
							 <name-fullname nil="true" />
							 <notes nil="true" />
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</primary-contact>
						<primary-address>
							 <id type="integer">9</id>
							 <created-at type="datetime">2008-10-27T12:56:40-07:00</created-at>
							 <updated-at type="datetime">2008-10-27T12:56:40-07:00</updated-at>
							 <name nil="true" />
							 <street1>1 Grainger Road</street1>
							 <street2 nil="true" />
							 <city>Newark</city>
							 <state>NJ</state>
							 <postal-code>92321</postal-code>
							 <attention nil="true" />
							 <active type="boolean">true</active>
							 <country>
									<id type="integer">223</id>
									<code>US</code>
									<name>United States</name>
							 </country>
							 <created-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </created-by>
							 <updated-by>
									<id type="integer">1</id>
									<login>coupasupport</login>
									<email>robert.monahon+feardemo@coupa.com</email>
									<employee-number />
									<firstname>Coupa</firstname>
									<lastname>Support</lastname>
									<salesforce-id nil="true" />
									<height />
							 </updated-by>
						</primary-address>
				 </supplier>
				 <uom>
						<id type="integer">1</id>
						<created-at nil="true" />
						<updated-at nil="true" />
						<code>EA</code>
						<name>Each</name>
						<allowable-precision type="integer">0</allowable-precision>
						<active type="boolean">true</active>
				 </uom>
				 <payment-term>
						<id type="integer">1</id>
						<created-at nil="true" />
						<updated-at nil="true" />
						<code>Net 30</code>
						<description />
						<days-for-net-payment type="integer">30</days-for-net-payment>
						<days-for-discount-payment nil="true" />
						<discount-rate nil="true" />
						<active type="boolean">true</active>
				 </payment-term>
				 <shipping-term>
						<id type="integer">1</id>
						<created-at nil="true" />
						<updated-at nil="true" />
						<code>Standard</code>
				 </shipping-term>
				 <asset-tags type="array" />
				 <attachments type="array" />
				 <created-by>
						<id type="integer">7</id>
						<login>ejohnson</login>
						<email>upgrade+ej@coupa.com</email>
						<employee-number />
						<firstname>Ellis (Marketing Lead)</firstname>
						<lastname>Johnson</lastname>
						<salesforce-id nil="true" />
						<height />
				 </created-by>
				 <updated-by>
						<id type="integer">6</id>
						<login>bhostler</login>
						<email>upgrade+bh@coupa.com</email>
						<employee-number />
						<firstname>Blair (Marketing VP)</firstname>
						<lastname>Hostler</lastname>
						<salesforce-id nil="true" />
						<height />
				 </updated-by>
			</requisition-line>
	 </requisition-lines>
	 <approvals type="array">
			<approval>
				 <id type="integer">1672</id>
				 <created-at nil="true" />
				 <updated-at nil="true" />
				 <position type="integer">1</position>
				 <approval-chain-id nil="true" />
				 <status>approved</status>
				 <approval-date type="datetime">2010-02-06T19:07:48-08:00</approval-date>
				 <note nil="true" />
				 <type>ManagementHierarchyApproval</type>
				 <approvable-type>RequisitionHeader</approvable-type>
				 <approvable-id type="integer">235</approvable-id>
				 <approver>
						<id type="integer">6</id>
						<login>bhostler</login>
						<email>upgrade+bh@coupa.com</email>
						<employee-number />
						<firstname>Blair (Marketing VP)</firstname>
						<lastname>Hostler</lastname>
						<salesforce-id nil="true" />
						<height />
				 </approver>
			</approval>
	 </approvals>
	 <created-by>
			<id type="integer">7</id>
			<login>ejohnson</login>
			<email>upgrade+ej@coupa.com</email>
			<employee-number />
			<firstname>Ellis (Marketing Lead)</firstname>
			<lastname>Johnson</lastname>
			<salesforce-id nil="true" />
			<height />
	 </created-by>
	 <updated-by>
			<id type="integer">6</id>
			<login>bhostler</login>
			<email>upgrade+bh@coupa.com</email>
			<employee-number />
			<firstname>Blair (Marketing VP)</firstname>
			<lastname>Hostler</lastname>
			<salesforce-id nil="true" />
			<height />
	 </updated-by>
</requisition-header>

Création de demande - Exemple de ligne basé sur le montant

Dans cet exemple, nous créons un brouillon de demande pour l'utilisateur 'kyle'. Nous n'utilisons aucun ID système Coupa pour les objets de référence. La ligne de référence est une ligne basée sur un montant.

Nous l'avons posté à l'URL suivante :https://<instance>.coupahost.com/api/requisitions.  La demande a ainsi été créée à l'état de brouillon.

<?xml version="1.0" encoding="UTF-8"?>
<requisition-header>
	 <requested-by>
			<login>kyle</login>
	 </requested-by>
	 <department>
			<name>Marketing</name>
	 </department>
	 <pcard />
	 <ship-to-address>
			<name>Headquarters</name>
	 </ship-to-address>
	 <justification />
	 <attachments />
	 <requisition-lines>
			<requisition-line>
				 <description>Cleaning Services for Building A</description>
				 <line-num type="integer">1</line-num>
				 <need-by-date type="datetime">2010-09-23T00:00:00-07:00</need-by-date>
				 <source-part-num />
				 <supp-aux-part-num />
				 <unit-price type="decimal">3000.00</unit-price>
				 <supplier>
						<name>Maintenance Mart</name>
				 </supplier>
				 <account>
						<code>Cleaning Services</code>
						<account-type>
							 <name>Chart of Accounts</name>
						</account-type>
				 </account>
				 <currency>
						<code>USD</code>
				 </currency>
				 <payment-term>
						<code>Net30</code>
				 </payment-term>
				 <shipping-term>
						<code>UPS</code>
				 </shipping-term>
				 <commodity>
						<name>Consulting Services</name>
				 </commodity>
			</requisition-line>
	 </requisition-lines>
</requisition-header> 

Exemple de création de demande - Article du catalogue

Dans cet exemple, nous créons un brouillon de demande pour l'utilisateur 'kyle'. Nous n'utilisons aucun ID système Coupa pour les objets de référence. La ligne de demande est basée sur un article du catalogue. Vous remarquerez qu'au lieu de transmettre des éléments tels que l'UDM, le prix, le fournisseur, etc... vous pouvez simplement transmettre le nom de l'article et le système affichera alors toutes les valeurs par défaut en fonction de l'article, tout comme il le fait via l'interface utilisateur.

Nous l'avons posté à l'URL : Ceci a créé la demandehttps://<instance>.coupahost.com/api/requisitions. dans un état de brouillon.

<?xml version="1.0" encoding="UTF-8"?>
<requisition-header>
	 <requested-by>
			<login>kyle</login>
	 </requested-by>
	 <department>
			<name>Marketing</name>
	 </department>
	 <pcard />
	 <ship-to-address>
			<name>Headquarters</name>
	 </ship-to-address>
	 <justification />
	 <attachments />
	 <requisition-lines>
			<requisition-line>
				 <item>
						<name>Window Cleaner</name>
				 </item>
				 <line-num type="integer">1</line-num>
				 <need-by-date type="datetime">2010-09-23T00:00:00-07:00</need-by-date>
				 <account>
						<code>Cleaning Services</code>
						<account-type>
							 <name>Chart of Accounts</name>
						</account-type>
				 </account>
			</requisition-line>
	 </requisition-lines>
</requisition-header>

Création de demande - Exemple de ligne basé sur la quantité

Dans cet exemple, nous créons un brouillon de demande pour l'utilisateur 'kyle'. Nous n'utilisons aucun ID système Coupa pour les objets de référence. La ligne de demande est un élément de ligne basé sur la quantité.

Nous l'avons posté à l'URL : Ceci a créé la demandehttps://<instance>.coupahost.com/api/requisitions.dans un état de brouillon. 

<?xml version="1.0" encoding="UTF-8"?>
<requisition-header>
	 <requested-by>
			<login>kyle</login>
	 </requested-by>
	 <department>
			<name>Marketing</name>
	 </department>
	 <pcard />
	 <ship-to-address>
			<name>Headquarters</name>
	 </ship-to-address>
	 <justification />
	 <attachments />
	 <requisition-lines>
			<requisition-line>
				 <description>New Projector Bulbs</description>
				 <line-num type="integer">1</line-num>
				 <need-by-date type="datetime">2010-07-23T00:00:00-07:00</need-by-date>
				 <source-part-num />
				 <supp-aux-part-num />
				 <unit-price type="decimal">3000.00</unit-price>
				 <quantity>2</quantity>
				 <uom>
						<code>EA</code>
				 </uom>
				 <supplier>
						<name>Maintenance Mart</name>
				 </supplier>
				 <account>
						<code>Cleaning Services</code>
						<account-type>
							 <name>Chart of Accounts</name>
						</account-type>
				 </account>
				 <currency>
						<code>USD</code>
				 </currency>
				 <payment-term>
						<code>Net30</code>
				 </payment-term>
				 <shipping-term>
						<code>UPS</code>
				 </shipping-term>
				 <commodity>
						<name>Consulting Services</name>
				 </commodity>
			</requisition-line>
	 </requisition-lines>
</requisition-header>

Exemple de création de demandes - Demande à lignes multiples

Dans cet exemple, nous créons et soumettons une demande pour l'utilisateur 'kyle'. Nous n'utilisons aucun ID système Coupa pour les objets de référence. La demande comporte trois articles : ligne de quantité, ligne de montant et ligne de catalogue.

Nous l'avons posté à l'URL : https://<instance>.coupahost.com/api/requisitions/new/submit_for_approval.Ceci a créé et soumis la demande pour approbation. 

<?xml version="1.0" encoding="UTF-8"?>
<requisition-header>
	 <requested-by>
			<login>kyle</login>
	 </requested-by>
	 <department>
			<name>Marketing</name>
	 </department>
	 <pcard />
	 <ship-to-address>
			<name>Headquarters</name>
	 </ship-to-address>
	 <justification />
	 <attachments />
	 <requisition-lines>
			<requisition-line>
				 <description>New Projector Bulbs</description>
				 <line-num type="integer">1</line-num>
				 <need-by-date type="datetime">2010-07-23T00:00:00-07:00</need-by-date>
				 <source-part-num />
				 <supp-aux-part-num />
				 <unit-price type="decimal">3000.00</unit-price>
				 <quantity>2</quantity>
				 <uom>
						<code>EA</code>
				 </uom>
				 <supplier>
						<name>Maintenance Mart</name>
				 </supplier>
				 <account>
						<code>Cleaning Services</code>
						<account-type>
							 <name>Chart of Accounts</name>
						</account-type>
				 </account>
				 <currency>
						<code>USD</code>
				 </currency>
				 <payment-term>
						<code>Net30</code>
				 </payment-term>
				 <shipping-term>
						<code>UPS</code>
				 </shipping-term>
				 <commodity>
						<name>Consulting Services</name>
				 </commodity>
			</requisition-line>
			<requisition-line>
				 <description>Cleaning Services for Building A</description>
				 <line-num type="integer">2</line-num>
				 <need-by-date type="datetime">2010-09-23T00:00:00-07:00</need-by-date>
				 <source-part-num />
				 <supp-aux-part-num />
				 <unit-price type="decimal">3000.00</unit-price>
				 <supplier>
						<name>Maintenance Mart</name>
				 </supplier>
				 <account>
						<code>Cleaning Services</code>
						<account-type>
							 <name>Chart of Accounts</name>
						</account-type>
				 </account>
				 <currency>
						<code>USD</code>
				 </currency>
				 <payment-term>
						<code>Net30</code>
				 </payment-term>
				 <shipping-term>
						<code>UPS</code>
				 </shipping-term>
				 <commodity>
						<name>Consulting Services</name>
				 </commodity>
			</requisition-line>
			<requisition-line>
				 <item>
						<name>Window Cleaner</name>
				 </item>
				 <line-num type="integer">3</line-num>
				 <need-by-date type="datetime">2010-09-23T00:00:00-07:00</need-by-date>
				 <account>
						<code>Cleaning Services</code>
						<account-type>
							 <name>Chart of Accounts</name>
						</account-type>
				 </account>
			</requisition-line>
	 </requisition-lines>
</requisition-header>

Demandes GET (Requête)

 

POST des demandes

Aperçu

La section suivante décrit comment utiliser l'API Coupa pour créer des demandes.

Notre API de création de demandes vous permet de :

1. Créer une demande en mode BROUILLON pour un utilisateur spécifié

2. Créez et soumettez une demande pour approbation au nom de l'utilisateur spécifié.

Il y a 2 URL que vous pouvez maintenant POST de nouvelles demandes pour :

  • <instance url>/api/requisitions - Cela créera une demande à l'état de brouillon, qui devra ensuite être soumise manuellement.
  • <instance url>/api/requisitions/new/submit_for_approval - Cela créera une demande et tentera de la soumettre pour approbation / action de l'acheteur.

Dans les deux cas, une demande doit être valide et soumise pour pouvoir être enregistrée. Plus précisément, ces éléments sont requis :

  • Au moins une ligne de demande
  • Une description ou un article pour chaque ligne
  • Une devise pour chaque ligne
  • Une quantité pour les lignes basées sur la quantité
  • Tous les champs personnalisés obligatoires
  • Toutes les validations personnalisées doivent réussir

Les demandes réussies renverront HTTP 201 Créé. Le corps de la réponse inclura la demande créée.

Les demandes infructueuses renverront une mauvaise demande HTTP 400. Le corps de la réponse inclut les erreurs de validation au format XML.

Coupa 14

 

Coupa 13

Téléchargez le fichier Excel Coupa 13 Flat File Integration Mapping si vous en avez encore besoin.

Objets référencés

Cette API créera uniquement les objets suivants dans le cadre de l'appel :

  • En-têtes de demande
  • Lignes de demande
  • Pièces jointes
  • Pièces jointes URL

Tous les autres objets référencés (UDM, articles, utilisateurs, fournisseurs, comptes, adresses, cartes d'achat, etc.) doivent déjà exister dans le système.

Vous trouverez ci-dessous une liste des objets référencés et comment les méthodes alternatives de recherche de l'objet dans le cadre de l'appel API. Par exemple, lorsque vous spécifiez l'utilisateur demandé, vous pouvez inclure son ID, son identifiant ou son adresse e-mail, et le système les recherchera. Il n'est pas nécessaire d'en inclure plusieurs. Si plusieurs critères de recherche sont utilisés, tous doivent correspondre pour trouver un enregistrement. Cliquez ici pour obtenir des instructions, des exemples et des instructions sur la façon d'effectuer des requêtes à l'aide de l'API Coupa.

Objet de référence Options des critères de recherche
Demandé par connexion
  adresse électronique
  ID utilisateur Coupa
Département Nom
  ID de département Coupa
Adresse de livraison pseudo
  ID d'adresse Coupa
Fournisseur Nom
  ID fournisseur Coupa
Type de compte (plan comptable) Nom
  ID plan comptable Coupa
Code du compte  
  ID de compte Coupa
Devise Code de devise
  ID de devise Coupa
UDM code
  ID UDM Coupa
Modalités de paiement code
  ID des conditions de paiement Coupa
Conditions d'expédition code
  ID des conditions d'expédition Coupa
Catégorie d'achat Nom
  ID de marchandise Coupa

 

Définitions de champs
Nom Requis ? Type Valeurs autorisées Description
justification  no texte 2000 caractères Il s'agit du champ de justification de la demande qui peut être utilisé pour décrire pourquoi l'achat est effectué.
pièces jointes (texte) no texte  2000 caractères Il s'agit de pièces jointes textuelles que vous pouvez communiquer dans une demande.
pièces jointes (url) no texte 500 caractères Il s'agit de l'emplacement d'une URL vers un fournisseur que vous souhaitez communiquer sur la demande.
description oui texte 255 caractères Il s'agit de la description de l'article de ligne lorsque vous n'utilisez pas d'article de catalogue.
numéro de ligne oui entier Entiers uniquement Il s'agit du numéro de ligne de la ligne de demande que vous transférez. Cette valeur doit être incrémentée de 1 pour chaque ligne de demande soumise.
source-part-num non  texte 255 caractères Il s'agit du numéro de pièce du fournisseur qui est par défaut un champ facultatif sur la ligne de demande.
prix unitaire oui décimal En fonction de votre précision. Pour une ligne basée sur la quantité, il s'agit du prix unitaire de chaque unité. Pour une ligne basée sur un montant, il s'agit de la valeur du service total.
need-by-date no datetime Format date et heure  
quantité non  entier En fonction de votre configuration de précision pour votre UDM Ceci est utilisé uniquement pour les lignes basées sur la quantité.

 

Remarques
  • Dans une ligne de demande, vous pouvez utiliser une description (format libre) ou un article (article de catalogue). Si un ID d'article est utilisé, l'article doit exister. Le n'est pas utilisé et est ignoré.
  • Les devises, les utilisateurs dans le champ demandé par et les fournisseurs doivent être dans le système avec le statut actif.
  • Article : Si un fournisseur préféré et un prix sont disponibles pour un article, il sera utilisé sauf si le prix unitaire est spécifié. Si un prix unitaire est spécifié, il remplacera le prix par défaut disponible pour l'article. Bien qu'il ne soit pas erroné de spécifier une description et un article, l'utilisation d'un article affecte à la description de l'article la même valeur, en ignorant le champ de description transmis.
  • Valeur par défaut : Sauf indication contraire dans le fichier XML, le système respectera les valeurs par défaut correspondantes dans le système. Tels que les modalités de paiement et d'expédition par défaut du dossier fournisseur.
  • Numérotation des lignes : l'API attend que le numéro de ligne s'incrémente de un pour chaque nouveau numéro de ligne. Si vous utilisez le même numéro de ligne, le système ignorera toutes les autres lignes du même numéro. 

Une partie ou la totalité de cette page peut avoir été traduite par machine. Toutes nos excuses pour les inexactitudes.

Articles associés


L'API Coupa Core

Notre API RESTful fournit un accès robuste pour lire, modifier ou intégrer vos données à la plate-forme Coupa.

Ressources

Nous avons organisé nos points de terminaison API par type d'objet : Données de référence, données transactionnelles et ressources partagées.

Ressources de données de référence

Les données de référence sont utilisées pour configurer les composants de base de Coupa tels que les utilisateurs, les fournisseurs, les comptes, et plus encore.

Ressources transactionnelles

Au fur et à mesure que les gens utilisent Coupa, des données transactionnelles telles que des demandes, des bons de commande et des factures sont créées.