Skip to main content

Overview

The Corso Shop API is intended to help e-commerce merchants add Green Shipping Protection to their websites or other customer-facing sales channels. The API supports configuring a widget shown to a customer, as well as requesting quotes for a cart so that protection may be added.

The API also supports uses cases that are not customer-facing, such as allowing Green Shipping Protection to be added to an order from a merchant admin flow.

The two steps in the process are shown in this sequence diagram:

1. Retrieve shop configuration and details (optional)

When the script managing the Corso Green Shipping Protection integration initializes, the shop configuration details may be retrieved. Since this configuration changes infrequently, it should typically be retrieved once per session and retained locally for the duration. The returned configuration object can be used to adjust the behavior and appearance of the site widget as needed.

A single endpoint will provide the configuration for each shop, using the shopId provided by Corso:

GET /shop/{shopId}

2. Request a quote

As the customer shops, a new shipping protection quote can be retrieved periodically as needed. As a best practice, anytime the cart value changes a new quote should be retrieved so that the value of any shipping protection purchased can reflect the value of the cart.

The quote endpoint is called by shopId, and with a cart-value parameter:

GET /shop/{shopId}/quote?cart-value=32.53

3. Using the quote

With a valid quote, no further interaction is needed with the Corso Shop API until the cart value changes again. The e-commerce site would typically use the quote information to add the appropriate product/variant combination, so that the customer purchases the shipping protection and the order is covered.

OAS Files

The Open API Specification files for this API can be downloaded in both JSON and YAML format.