• Dernière modification le: 12 August 2019

Exemples d'appels API DataFileSources

DataFileSources GET

Options de requête

Vous trouverez ci-dessous un tableau présentant les différentes options de requête et leurs paramètres

Nom du filtre Objet
créé_à Utilisez le paramètre create_at pour contrôler les horodatages de début et de fin entre lesquels vous avez besoin du statut détaillé des fichiers traités (statut des fichiers, erreurs au niveau des champs)
source_pour Utilisez le paramètre source_for pour filtrer les fichiers en fonction de l'objet d'intérêt
type

Utilisez le paramètre type pour déterminer si le type de fichier sur lequel vous avez besoin d'informations - fichier envoyé à Coupa ou fichier envoyé par Coupa

statut Utilisez le paramètre de statut pour filtrer les sources de données en fonction du statut de traitement en fonction de l'objectif de votre requête
nom_fichier_fichier Utilisez le paramètre file_file_name pour rechercher des sources de fichiers de données pour un fichier spécifique

 


Structure des données

Le tableau ci-dessous répertorie les différentes valeurs renvoyées pour un appel GET donné. Les espaces avant un nom de champ signifient qu'il est imbriqué sous l'une des balises précédentes :

Argument Type Valeurs
id entier  
créé à datetime AAAA-MM-JJTHH:MM:SS-HH:MM
mis à jour à datetime AAAA-MM-JJTHH:MM:SS-HH:MM
type chaîne BackgroundCsvFileLoad, DataFileSource, BackgroundImportCorporateCreditCard...
source-for chaîne InvoiceHeader, Payment, Invoices, ExpenseReport, Supplier, User, Item, Commodity, Address, Contract, Account, Lookup Value...
statut chaîne Terminé, Échec, Nouvelle tentative, Chargement, Soumis à la resquille, En attente, Chargement, En pause, Arrêté
nom_fichier chaîne Invoices_20141209_234608Z.csv, etc
taille_fichier chaîne 9822
texte-résultat chaîne Le résultat du processus ex. 27 lignes traitées, création de 0 nouvelle ligne et mise à jour de 11 lignes.
progression entier 27
heure de début datetime AAAA-MM-JJTHH:MM:SS-HH:MM
heure de fin datetime AAAA-MM-JJTHH:MM:SS-HH:MM
erreurs de téléchargement rangée  
upload-errors/upload-error    
upload-errors/upload-error/id entier 123456
upload-errors/upload-error/créé-à datetime AAAA-MM-JJTHH:MM:SS-HH:MM
upload-errors/upload-error/update-at datetime AAAA-MM-JJTHH:MM:SS-HH:MM
upload-errors/upload-error/type chaîne Le type d'erreur, ex. UploadRowError
upload-errors/upload-error/ligne entier 1
upload-errors/upload-error/première-colonne    
upload-errors/upload-error/champ-avec-erreur chaîne Nom de colonne où l'erreur est survenue
upload-errors/upload-error/valeur chaîne

brouillon, action_acheteur_en_attente, approbation_en_attente, approuvé, reçu, commandé, partiellement reçu, rejeté, avec tiré

upload-errors/upload-error/erreurs de champ rangée  
upload-errors/upload=erreur/créé par utilisateur

Dossier de l'utilisateur incluant l'identifiant, la connexion, le prénom et le nom, e-mail etc

upload-errors/upload-error/mis-a-jour par utilisateur Dossier de l'utilisateur incluant l'identifiant, la connexion, le prénom et le nom, e-mail etc
créé par utilisateur

Dossier de l'utilisateur incluant l'identifiant, la connexion, le prénom et le nom, e-mail etc

mis à jour par utilisateur Dossier de l'utilisateur incluant l'identifiant, la connexion, le prénom et le nom, e-mail etc

 

Exemples d'appels API

Exemple de requête DataFileSources - Requête pour une date donnée

Dans cet exemple, nous recherchons toutes les sources de fichiers de données créées au cours des dernières 24 heures (l'heure actuelle étant 15:00:00 PST 17 avril 2015 ou 2015-04-17 22:00:00). Bien que vous puissiez utiliser une date et une heure plus grandes, il est important de se rappeler que l'API DataFileSource a un certain nombre d'objets et d'enregistrements connexes qui la référencent. L'interrogation de nombres ou d'enregistrements importants peut entraîner des performances négatives dans votre instance. De plus, comme pour tous les appels API vers Coupa, il y a une limite de 50 enregistrements retournés par appel. Pour interroger l'ensemble suivant, ajoutez &offset=50 à la fin de votre appel

  • https://<instance>.coupahost.com/api/data_file_sources?created_at[gt]='<timestamp>'https://<instance>.coupahost.com/api/data_file_sources?created_at[gt]='2015-04-16 22:00:00'

Exemples de sources de données quotidiennes

<?xml version="1.0" encoding="UTF-8"?>
<data-file-sources type="array">
	 <data-file-source>
			<id type="integer">1117</id>
			<created-at type="datetime">2015-04-17T08:34:17-07:00</created-at>
			<updated-at type="datetime">2015-04-17T08:34:25-07:00</updated-at>
			<type>BackgroundCsvFileLoad</type>
			<source-for>LookupValue</source-for>
			<status>sample</status>
			<file-file-name>lookup_value_list_wbstype.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>300</file-file-size>
			<result-text nil="true" />
			<progress nil="true" />
			<start-time nil="true" />
			<end-time nil="true" />
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">920</id>
						<created-at type="datetime">2015-04-17T08:34:25-07:00</created-at>
						<updated-at type="datetime">2015-04-17T08:34:25-07:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">2</row>
						<first-column>SAP Upgrade</first-column>
						<field-with-error>parent_id</field-with-error>
						<value>1</value>
						<field-errors type="array">
							 <field-error>Parent unable to find matching parent.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</created-by>
						<updated-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">921</id>
						<created-at type="datetime">2015-04-17T08:34:25-07:00</created-at>
						<updated-at type="datetime">2015-04-17T08:34:25-07:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">3</row>
						<first-column>Coupa Implementation</first-column>
						<field-with-error>parent_id</field-with-error>
						<value>1</value>
						<field-errors type="array">
							 <field-error>Parent unable to find matching parent.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</created-by>
						<updated-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">81</id>
				 <login>bknott</login>
				 <email>brent.knott+bknott@coupa.com</email>
				 <employee-number />
				 <firstname>Brent</firstname>
				 <lastname>Knott</lastname>
				 <salesforce-id nil="true" />
				 <company-code>100</company-code>
				 <cost-center>10000</cost-center>
				 <account-category>K</account-category>
			</created-by>
			<updated-by>
				 <id type="integer">81</id>
				 <login>bknott</login>
				 <email>brent.knott+bknott@coupa.com</email>
				 <employee-number />
				 <firstname>Brent</firstname>
				 <lastname>Knott</lastname>
				 <salesforce-id nil="true" />
				 <company-code>100</company-code>
				 <cost-center>10000</cost-center>
				 <account-category>K</account-category>
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1118</id>
			<created-at type="datetime">2015-04-17T08:35:15-07:00</created-at>
			<updated-at type="datetime">2015-04-17T08:35:16-07:00</updated-at>
			<type>BackgroundCsvFileLoad</type>
			<source-for>LookupValue</source-for>
			<status>sample</status>
			<file-file-name>lookup_value_list_wbstype.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>304</file-file-size>
			<result-text nil="true" />
			<progress nil="true" />
			<start-time nil="true" />
			<end-time nil="true" />
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">922</id>
						<created-at type="datetime">2015-04-17T08:35:16-07:00</created-at>
						<updated-at type="datetime">2015-04-17T08:35:16-07:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">2</row>
						<first-column>SAP Upgrade</first-column>
						<field-with-error>parent_id</field-with-error>
						<value>1</value>
						<field-errors type="array">
							 <field-error>Parent unable to find matching parent.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</created-by>
						<updated-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">923</id>
						<created-at type="datetime">2015-04-17T08:35:16-07:00</created-at>
						<updated-at type="datetime">2015-04-17T08:35:16-07:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">3</row>
						<first-column>Coupa Implementation</first-column>
						<field-with-error>parent_id</field-with-error>
						<value>1</value>
						<field-errors type="array">
							 <field-error>Parent unable to find matching parent.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</created-by>
						<updated-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">81</id>
				 <login>bknott</login>
				 <email>brent.knott+bknott@coupa.com</email>
				 <employee-number />
				 <firstname>Brent</firstname>
				 <lastname>Knott</lastname>
				 <salesforce-id nil="true" />
				 <company-code>100</company-code>
				 <cost-center>10000</cost-center>
				 <account-category>K</account-category>
			</created-by>
			<updated-by>
				 <id type="integer">81</id>
				 <login>bknott</login>
				 <email>brent.knott+bknott@coupa.com</email>
				 <employee-number />
				 <firstname>Brent</firstname>
				 <lastname>Knott</lastname>
				 <salesforce-id nil="true" />
				 <company-code>100</company-code>
				 <cost-center>10000</cost-center>
				 <account-category>K</account-category>
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1119</id>
			<created-at type="datetime">2015-04-17T08:36:07-07:00</created-at>
			<updated-at type="datetime">2015-04-17T08:36:07-07:00</updated-at>
			<type>BackgroundCsvFileLoad</type>
			<source-for>LookupValue</source-for>
			<status>sample</status>
			<file-file-name>lookup_value_list_wbstype.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>344</file-file-size>
			<result-text nil="true" />
			<progress nil="true" />
			<start-time nil="true" />
			<end-time nil="true" />
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">917</id>
						<created-at type="datetime">2015-04-17T08:36:08-07:00</created-at>
						<updated-at type="datetime">2015-04-17T08:36:08-07:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">2</row>
						<first-column>SAP Upgrade</first-column>
						<field-with-error>parent_id</field-with-error>
						<value>1</value>
						<field-errors type="array">
							 <field-error>Parent unable to find matching parent.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</created-by>
						<updated-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">925</id>
						<created-at type="datetime">2015-04-17T08:36:08-07:00</created-at>
						<updated-at type="datetime">2015-04-17T08:36:08-07:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">3</row>
						<first-column>Coupa Implementation</first-column>
						<field-with-error>parent_id</field-with-error>
						<value>1</value>
						<field-errors type="array">
							 <field-error>Parent unable to find matching parent.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</created-by>
						<updated-by>
							 <id type="integer">81</id>
							 <login>bknott</login>
							 <email>brent.knott+bknott@coupa.com</email>
							 <employee-number />
							 <firstname>Brent</firstname>
							 <lastname>Knott</lastname>
							 <salesforce-id nil="true" />
							 <company-code>100</company-code>
							 <cost-center>10000</cost-center>
							 <account-category>K</account-category>
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">81</id>
				 <login>bknott</login>
				 <email>brent.knott+bknott@coupa.com</email>
				 <employee-number />
				 <firstname>Brent</firstname>
				 <lastname>Knott</lastname>
				 <salesforce-id nil="true" />
				 <company-code>100</company-code>
				 <cost-center>10000</cost-center>
				 <account-category>K</account-category>
			</created-by>
			<updated-by>
				 <id type="integer">81</id>
				 <login>bknott</login>
				 <email>brent.knott+bknott@coupa.com</email>
				 <employee-number />
				 <firstname>Brent</firstname>
				 <lastname>Knott</lastname>
				 <salesforce-id nil="true" />
				 <company-code>100</company-code>
				 <cost-center>10000</cost-center>
				 <account-category>K</account-category>
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1125</id>
			<created-at type="datetime">2015-04-17T12:59:44-07:00</created-at>
			<updated-at type="datetime">2015-04-17T12:59:45-07:00</updated-at>
			<type>DataFileSource</type>
			<source-for>Supplier</source-for>
			<status>sample</status>
			<file-file-name>remit_to_address_list.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>221</file-file-size>
			<result-text nil="true" />
			<progress nil="true" />
			<start-time nil="true" />
			<end-time nil="true" />
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">926</id>
						<created-at type="datetime">2015-04-17T12:59:46-07:00</created-at>
						<updated-at type="datetime">2015-04-17T12:59:46-07:00</updated-at>
						<type>UploadHeaderError</type>
						<row nil="true" />
						<first-column nil="true" />
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors>Column header Active is not valid.</field-errors>
						<created-by>
							 <id type="integer">1</id>
							 <login>coupasupport</login>
							 <email>rakesh.tatineni+01@coupa.com</email>
							 <employee-number />
							 <firstname>Coupa</firstname>
							 <lastname>Support</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">1</id>
							 <login>coupasupport</login>
							 <email>rakesh.tatineni+01@coupa.com</email>
							 <employee-number />
							 <firstname>Coupa</firstname>
							 <lastname>Support</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">1</id>
				 <login>coupasupport</login>
				 <email>rakesh.tatineni+01@coupa.com</email>
				 <employee-number />
				 <firstname>Coupa</firstname>
				 <lastname>Support</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">1</id>
				 <login>coupasupport</login>
				 <email>rakesh.tatineni+01@coupa.com</email>
				 <employee-number />
				 <firstname>Coupa</firstname>
				 <lastname>Support</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1126</id>
			<created-at type="datetime">2015-04-17T13:00:05-07:00</created-at>
			<updated-at type="datetime">2015-04-17T13:00:04-07:00</updated-at>
			<type>DataFileSource</type>
			<source-for>Supplier</source-for>
			<status>sample</status>
			<file-file-name>remit_to_address_list.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>210</file-file-size>
			<result-text nil="true" />
			<progress nil="true" />
			<start-time nil="true" />
			<end-time nil="true" />
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">927</id>
						<created-at type="datetime">2015-04-17T13:00:04-07:00</created-at>
						<updated-at type="datetime">2015-04-17T13:00:04-07:00</updated-at>
						<type>UploadHeaderError</type>
						<row nil="true" />
						<first-column nil="true" />
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors>Column header Line1* is not valid.</field-errors>
						<created-by>
							 <id type="integer">1</id>
							 <login>coupasupport</login>
							 <email>rakesh.tatineni+01@coupa.com</email>
							 <employee-number />
							 <firstname>Coupa</firstname>
							 <lastname>Support</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">1</id>
							 <login>coupasupport</login>
							 <email>rakesh.tatineni+01@coupa.com</email>
							 <employee-number />
							 <firstname>Coupa</firstname>
							 <lastname>Support</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">1</id>
				 <login>coupasupport</login>
				 <email>rakesh.tatineni+01@coupa.com</email>
				 <employee-number />
				 <firstname>Coupa</firstname>
				 <lastname>Support</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">1</id>
				 <login>coupasupport</login>
				 <email>rakesh.tatineni+01@coupa.com</email>
				 <employee-number />
				 <firstname>Coupa</firstname>
				 <lastname>Support</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
</data-file-sources> 

Exemple de requête DataFileSources - Requête pour un objet spécifique 

Dans cet exemple, nous recherchons toutes les valeurs de recherche entrantes pour le 15 décembre 2014 afin de voir s'il y a eu des erreurs avec les fichiers traités dans Coupa. Il s'agit d'une requête à plusieurs étapes, comme indiqué ci-dessous :

  • https://<instance>.coupahost.com/api/data_file_sources?created_at[gt]='<day> 00:00:00'&created_at[lt]='<day> 23:59:59'&source_for=<object>
    https://<instance>.coupahost.com/api/data_file_sources?created_at[gt]='2014-12-15 00:00:00'&created_at[lt]='2014-12-15 23:59:59'&source_for=LookupValue

Cette requête comporte trois parties. La première limite aux seules sources de fichiers de données créées depuis minuit UTC le 15, et la seconde limite aux sources de fichiers de données créées avant minuit le 16. La dernière section définit l'objet que nous recherchons, en l'occurrence LookupValue.

Exemple de réponse pour LookupValues entrant le 15/12/14

<?xml version="1.0" encoding="UTF-8"?>
<data-file-sources type="array">
	 <data-file-source>
			<id type="integer">1332</id>
			<created-at type="datetime">2014-12-15T08:47:54-08:00</created-at>
			<updated-at type="datetime">2014-12-15T08:48:53-08:00</updated-at>
			<type>DataFileSource</type>
			<source-for>LookupValue</source-for>
			<status>done</status>
			<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>282</file-file-size>
			<result-text>0 rows processed, creating 0 new rows and updating 0 rows.</result-text>
			<progress type="integer">0</progress>
			<start-time type="datetime">2014-12-15T08:48:07-08:00</start-time>
			<end-time type="datetime">2014-12-15T08:48:53-08:00</end-time>
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">964</id>
						<created-at type="datetime">2014-12-15T08:48:10-08:00</created-at>
						<updated-at type="datetime">2014-12-15T08:48:10-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">1</row>
						<first-column>TESTUS1</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">965</id>
						<created-at type="datetime">2014-12-15T08:48:13-08:00</created-at>
						<updated-at type="datetime">2014-12-15T08:48:13-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">2</row>
						<first-column>TESTEMEA1</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">966</id>
						<created-at type="datetime">2014-12-15T08:48:13-08:00</created-at>
						<updated-at type="datetime">2014-12-15T08:48:13-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">3</row>
						<first-column>TESTSales1</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1333</id>
			<created-at type="datetime">2014-12-15T08:55:19-08:00</created-at>
			<updated-at type="datetime">2014-12-15T08:55:53-08:00</updated-at>
			<type>DataFileSource</type>
			<source-for>LookupValue</source-for>
			<status>done</status>
			<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>279</file-file-size>
			<result-text>0 rows processed, creating 0 new rows and updating 0 rows.</result-text>
			<progress type="integer">0</progress>
			<start-time type="datetime">2014-12-15T08:55:27-08:00</start-time>
			<end-time type="datetime">2014-12-15T08:55:53-08:00</end-time>
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">967</id>
						<created-at type="datetime">2014-12-15T08:55:29-08:00</created-at>
						<updated-at type="datetime">2014-12-15T08:55:29-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">1</row>
						<first-column>TESTUS</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">968</id>
						<created-at type="datetime">2014-12-15T08:55:29-08:00</created-at>
						<updated-at type="datetime">2014-12-15T08:55:29-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">2</row>
						<first-column>TESTEMEA</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">969</id>
						<created-at type="datetime">2014-12-15T08:55:29-08:00</created-at>
						<updated-at type="datetime">2014-12-15T08:55:29-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">3</row>
						<first-column>TESTSales</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1334</id>
			<created-at type="datetime">2014-12-15T09:13:17-08:00</created-at>
			<updated-at type="datetime">2014-12-15T09:13:55-08:00</updated-at>
			<type>DataFileSource</type>
			<source-for>LookupValue</source-for>
			<status>done</status>
			<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>258</file-file-size>
			<result-text>0 rows processed, creating 0 new rows and updating 0 rows.</result-text>
			<progress type="integer">0</progress>
			<start-time type="datetime">2014-12-15T09:13:27-08:00</start-time>
			<end-time type="datetime">2014-12-15T09:13:55-08:00</end-time>
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">970</id>
						<created-at type="datetime">2014-12-15T09:13:30-08:00</created-at>
						<updated-at type="datetime">2014-12-15T09:13:30-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">1</row>
						<first-column>TESTUS</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">971</id>
						<created-at type="datetime">2014-12-15T09:13:30-08:00</created-at>
						<updated-at type="datetime">2014-12-15T09:13:30-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">2</row>
						<first-column>TESTEMEA</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
				 <upload-error>
						<id type="integer">972</id>
						<created-at type="datetime">2014-12-15T09:13:31-08:00</created-at>
						<updated-at type="datetime">2014-12-15T09:13:31-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">3</row>
						<first-column>TESTSales</first-column>
						<field-with-error nil="true" />
						<value nil="true" />
						<field-errors type="array">
							 <field-error>Row corrupt or invalid.</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1335</id>
			<created-at type="datetime">2014-12-15T09:22:15-08:00</created-at>
			<updated-at type="datetime">2014-12-15T09:22:32-08:00</updated-at>
			<type>BackgroundCsvFileLoad</type>
			<source-for>LookupValue</source-for>
			<status>done</status>
			<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
			<file-content-type />
			<file-file-size>282</file-file-size>
			<result-text>3 rows processed, creating 0 new rows and updating 3 rows.</result-text>
			<progress type="integer">3</progress>
			<start-time type="datetime">2014-12-15T09:22:24-08:00</start-time>
			<end-time type="datetime">2014-12-15T09:22:32-08:00</end-time>
			<upload-errors type="array" />
			<created-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1336</id>
			<created-at type="datetime">2014-12-15T09:28:19-08:00</created-at>
			<updated-at type="datetime">2014-12-15T09:28:32-08:00</updated-at>
			<type>BackgroundCsvFileLoad</type>
			<source-for>LookupValue</source-for>
			<status>done</status>
			<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
			<file-content-type />
			<file-file-size>282</file-file-size>
			<result-text>3 rows processed, creating 0 new rows and updating 3 rows.</result-text>
			<progress type="integer">3</progress>
			<start-time type="datetime">2014-12-15T09:28:29-08:00</start-time>
			<end-time type="datetime">2014-12-15T09:28:32-08:00</end-time>
			<upload-errors type="array" />
			<created-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1337</id>
			<created-at type="datetime">2014-12-15T09:34:24-08:00</created-at>
			<updated-at type="datetime">2014-12-15T09:35:00-08:00</updated-at>
			<type>BackgroundCsvFileLoad</type>
			<source-for>LookupValue</source-for>
			<status>done</status>
			<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
			<file-content-type />
			<file-file-size>332</file-file-size>
			<result-text>4 rows processed, creating 0 new rows and updating 3 rows.</result-text>
			<progress type="integer">4</progress>
			<start-time type="datetime">2014-12-15T09:34:32-08:00</start-time>
			<end-time type="datetime">2014-12-15T09:35:00-08:00</end-time>
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">973</id>
						<created-at type="datetime">2014-12-15T09:34:35-08:00</created-at>
						<updated-at type="datetime">2014-12-15T09:34:35-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">2</row>
						<first-column>0200</first-column>
						<field-with-error>name</field-with-error>
						<value>TESTUS1</value>
						<field-errors type="array">
							 <field-error>Name has already been taken</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
	 <data-file-source>
			<id type="integer">1338</id>
			<created-at type="datetime">2014-12-15T10:40:57-08:00</created-at>
			<updated-at type="datetime">2014-12-15T10:41:33-08:00</updated-at>
			<type>BackgroundCsvFileLoad</type>
			<source-for>LookupValue</source-for>
			<status>done</status>
			<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
			<file-content-type />
			<file-file-size>332</file-file-size>
			<result-text>4 rows processed, creating 0 new rows and updating 3 rows.</result-text>
			<progress type="integer">4</progress>
			<start-time type="datetime">2014-12-15T10:41:06-08:00</start-time>
			<end-time type="datetime">2014-12-15T10:41:33-08:00</end-time>
			<upload-errors type="array">
				 <upload-error>
						<id type="integer">974</id>
						<created-at type="datetime">2014-12-15T10:41:11-08:00</created-at>
						<updated-at type="datetime">2014-12-15T10:41:11-08:00</updated-at>
						<type>UploadRowError</type>
						<row type="integer">2</row>
						<first-column>0200</first-column>
						<field-with-error>name</field-with-error>
						<value>TESTUS1</value>
						<field-errors type="array">
							 <field-error>Name has already been taken</field-error>
						</field-errors>
						<created-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</created-by>
						<updated-by>
							 <id type="integer">93</id>
							 <login>sftp_integration@coupa.com</login>
							 <email>sftp_integration@coupa.com</email>
							 <employee-number nil="true" />
							 <firstname>sFTP</firstname>
							 <lastname>Integration</lastname>
							 <salesforce-id nil="true" />
							 <company-code />
							 <cost-center />
							 <account-category />
						</updated-by>
				 </upload-error>
			</upload-errors>
			<created-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</created-by>
			<updated-by>
				 <id type="integer">93</id>
				 <login>sftp_integration@coupa.com</login>
				 <email>sftp_integration@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>sFTP</firstname>
				 <lastname>Integration</lastname>
				 <salesforce-id nil="true" />
				 <company-code />
				 <cost-center />
				 <account-category />
			</updated-by>
	 </data-file-source>
</data-file-sources> 

Exemple de requête DataFileSources - Source de fichier de données spécifique à la requête 

Dans cet exemple, nous interrogeons datafilesource #1338. Il s'agit de l'ID Coupa interne généré automatiquement pour cet objet et il s'agit de la principale méthode d'identification de cet enregistrement.

Nous avons deux méthodes pour interroger cet enregistrement :

  • Format 1 : https://<instance>.coupahost.com/api/data_file_sources/<id>

        https://<instance>.coupahost.com/api/data_file_sources/1338

        La sortie de cette requête est affichée ci-dessous 

  • Format 2 : https://<instance>.coupahost.com/api/data_file_sources?id=<id>

                            https://<instance>.coupahost.com/api/data_file_sources?id=1338
                            Pour ce format, la réponse sera légèrement différente. La totalité de la sortie ci-dessous (à l'exception des informations de version xml) sera encapsulée dans une <data-file-sources type="array"> </data-file-sources>balise car le paramètre ? peut renvoyer plusieurs enregistrements, tandis que la spécification explicite de l'id ne peut renvoyer que celui-ci

Exemple de réponse GET DataSource

<?xml version="1.0" encoding="UTF-8"?>
<data-file-source>
	 <id type="integer">1338</id>
	 <created-at type="datetime">2014-12-15T10:40:57-08:00</created-at>
	 <updated-at type="datetime">2014-12-15T10:41:33-08:00</updated-at>
	 <type>BackgroundCsvFileLoad</type>
	 <source-for>LookupValue</source-for>
	 <status>done</status>
	 <file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
	 <file-content-type />
	 <file-file-size>332</file-file-size>
	 <result-text>4 rows processed, creating 0 new rows and updating 3 rows.</result-text>
	 <progress type="integer">4</progress>
	 <start-time type="datetime">2014-12-15T10:41:06-08:00</start-time>
	 <end-time type="datetime">2014-12-15T10:41:33-08:00</end-time>
	 <upload-errors type="array">
			<upload-error>
				 <id type="integer">974</id>
				 <created-at type="datetime">2014-12-15T10:41:11-08:00</created-at>
				 <updated-at type="datetime">2014-12-15T10:41:11-08:00</updated-at>
				 <type>UploadRowError</type>
				 <row type="integer">2</row>
				 <first-column>0200</first-column>
				 <field-with-error>name</field-with-error>
				 <value>TESTUS1</value>
				 <field-errors type="array">
						<field-error>Name has already been taken</field-error>
				 </field-errors>
				 <created-by>
						<id type="integer">93</id>
						<login>sftp_integration@coupa.com</login>
						<email>sftp_integration@coupa.com</email>
						<employee-number nil="true" />
						<firstname>sFTP</firstname>
						<lastname>Integration</lastname>
						<salesforce-id nil="true" />
						<company-code />
						<cost-center />
						<account-category />
				 </created-by>
				 <updated-by>
						<id type="integer">93</id>
						<login>sftp_integration@coupa.com</login>
						<email>sftp_integration@coupa.com</email>
						<employee-number nil="true" />
						<firstname>sFTP</firstname>
						<lastname>Integration</lastname>
						<salesforce-id nil="true" />
						<company-code />
						<cost-center />
						<account-category />
				 </updated-by>
			</upload-error>
	 </upload-errors>
	 <created-by>
			<id type="integer">93</id>
			<login>sftp_integration@coupa.com</login>
			<email>sftp_integration@coupa.com</email>
			<employee-number nil="true" />
			<firstname>sFTP</firstname>
			<lastname>Integration</lastname>
			<salesforce-id nil="true" />
			<company-code />
			<cost-center />
			<account-category />
	 </created-by>
	 <updated-by>
			<id type="integer">93</id>
			<login>sftp_integration@coupa.com</login>
			<email>sftp_integration@coupa.com</email>
			<employee-number nil="true" />
			<firstname>sFTP</firstname>
			<lastname>Integration</lastname>
			<salesforce-id nil="true" />
			<company-code />
			<cost-center />
			<account-category />
	 </updated-by>
</data-file-source>

Exemple de requête DataFileSources - Fichier spécifique à la requête

Dans cet exemple, nous recherchons une source de données créée pour un fichier nommé lookup_list.csv.

Nous avons deux méthodes pour interroger cet enregistrement :

  • Format 1 : https://<instance>.coupahost.com/api/data_file_sources?file_file_name=filename
    https://<instance>.coupahost.com/api/data_file_sources?file_file_name=lookup_list.csv
    La sortie de cette requête est affichée ci-dessous

Exemple de réponse GET DataSource

 <?xml version="1.0" encoding="UTF-8"?>
<data-file-sources type="array">
	 <data-file-source>
			<id type="integer">990</id>
			<created-at type="datetime">2015-07-09T16:32:42-07:00</created-at>
			<updated-at type="datetime">2015-07-09T16:34:19-07:00</updated-at>
			<type>DataFileSource</type>
			<source-for>Lookup</source-for>
			<status>done</status>
			<file-file-name>lookup_list.csv</file-file-name>
			<file-content-type>text/csv</file-content-type>
			<file-file-size>170</file-file-size>
			<result-text>0 rows processed, creating 0 new rows and updating 0 rows.</result-text>
			<progress nil="true" />
			<start-time type="datetime">2015-07-09T16:34:05-07:00</start-time>
			<end-time type="datetime">2015-07-09T16:34:19-07:00</end-time>
			<upload-errors type="array" />
			<created-by>
				 <id type="integer">85</id>
				 <login>staging@coupa.com</login>
				 <email>staging@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>John</firstname>
				 <lastname>Doe</lastname>
			</created-by>
			<updated-by>
				 <id type="integer">85</id>
				 <login>staging@coupa.com</login>
				 <email>staging@coupa.com</email>
				 <employee-number nil="true" />
				 <firstname>John</firstname>
				 <lastname>Doe</lastname>
			</updated-by>
	 </data-file-source>
</data-file-sources>

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.