Skip to main content

 

 

Coupa Success Portal

2.10 Check Error Handling on Suppliers

Using API

See https://coupadocs.atlassian.net/wiki/display/integrate/Suppliers

The following samples show failure scenarios:

Sample API 1 - Updating status from active to inactive

PUT

https:// <instance>/api/suppliers/:supplier_id

Payload

<?xml version="1.0" encoding="UTF-8"?>
<supplier>
  <status>false</status>
</supplier>

Error message: Supplier status must be one of active, inactive, onboarding.

Sample API 2 - Changing PO method from email to prompt

PUT

https:// <instance>/api/suppliers/:supplier_id

Payload

<?xml version="1.0" encoding="UTF-8"?>
<supplier>
  <po_method>PROMPT</po_method>
</supplier>

Error message: PO method must be one of cxml, xml, email, integration, prompt or buy_online.

Sample API 3 - Changing PO email

PUT

https:// <instance>/api/suppliers/:supplier_id

Payload

<?xml version="1.0" encoding="UTF-8"?>
<supplier>
  <po-email>changeemailgmail.com</po-email>
</supplier>

Error message: Supplier email is not a valid email address.

Sample API 4 - Fetching supplier xml

PUT

https:// <instance>/api/suppliers/:supplier_id

GET

X-COUPA-API-KEY: c34752e926651ca0b434de4c151903b465fead2a1

ACCEPT

application/xml

Error message: 401: Unauthorized

This error occurs due to an incorrect API key.

Using CSV

For info on values to be used and required fields, see https://coupadocs.atlassian.net/wiki/display/integrate/Suppliers.

Note that custom fields are not part of the documentation, and updating custom field data depends on their configuration. For example, if a custom field on a Supplier is required, passing that field as blank during creating a new Supplier gives an error message without creating the Supplier.

  • Was this article helpful?