3.10 Check Error Handling on Lookup Values

Revised: 20 February 2020

Using API

See https://success.coupa.com/Integrate/Technical_Documentation/API/Resources/Reference/lookupvalues

The following samples show failure scenarios:

Sample API 1 - Updating lookup value

PUT

https:// <instance>/api/lookup_values/:id

Payload

<?xml version="1.0" encoding="UTF-8"?>
<lookup-value>
  <lookup>
    <name>2U-Canada_CO_BU_HE_HA111</name>
  </lookup>
</lookup-value>

Error message: Unable to find valid Lookup record for lookup with keys {"name"=>"2U-Canada_CO_BU_HE_HA111"}. Possible keys are ["id", "name"]. Please verify your xml.

This error occurs due to an invalid Lookup in the system.

Sample API 2 - Fetching lookup value xml

PUT

https:// <instance>/api/lookup_values/:id

GET

X-COUPA-API-KEY: c34752e926651ca0b434de4c151903b465fead2a1

ACCEPT

application/xml

Error: 401: Unauthorized

This error occurs due to an incorrect API key.

Using CSV

For information on values to be used and required fields, see https://success.coupa.com/Integrate/Technical_Documentation/CSV/Import/Lookup_Values.

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 Lookup Value is required, passing that field as blank during creating a new Lookup Value gives an error message without creating the Lookup Value.