Legacy CSO API

The Legacy CSO API provides comprehensive access to CSO resources using API key authentication.

The Legacy CSO API allows you to create, update, and retrieve data in CSO. The API is based on import and export of data from fact sheets mediated by a RESTful web service, enabling data flow between CSO and third-party systems.

Base URL and Format

All API calls use the HTTPS protocol. Resources are accessed using the following format:

https://{name_of_cso_site}/api/{resource_name}/{resource_id}

The name of a customer CSO site follows the pattern {company_name}.cso.coupahost.com. Note that API calls use the ID to specify a resource, not the actual name of the object or data set.

Authentication

Authentication is mediated by a unique API key generated by Coupa. The API key is stored in CSO and associated with an API user. The API key must be included in the header of all API requests as X-CSO-API-KEY, and the Accept header must be set to application/json.

API Operators

The CSO API supports Coupa standard API operators to filter results. Operators can be combined to fine-tune responses. Note that all conditions must match to retrieve a particular object or data point.

Examples of filtering operators:

Retrieve the market with the name A:

GET https://{name_of_cso_site}/api/markets?name=A

Retrieve all markets with names containing 'european':

GET https://{name_of_cso_site}/api/markets?name[contains]=european

Retrieve all markets with names starting with 'FTL':

GET https://{name_of_cso_site}/api/markets?name[starts_with]=FTL

Retrieve all markets with names ending with '2018':

GET https://{name_of_cso_site}/api/markets?name[ends_with]=2018

Retrieve the first 50 events with names including 'LTL':

GET https://{name_of_cso_site}/api/events?limit=50&name[contains]=LTL

Best Practices

While there is no technical limit to the number of requests or size of data sets, good practice includes:

  • Use offset and limit operators to reduce response times

  • Send large amounts of data in smaller pieces

  • Use a fact field to hold a timestamp or update sequence number to query only new data since the last update

Available Resources

The following sections provide detailed information about each resource type available in the Legacy CSO API.