# Onward API

Version: 1.0.0

## Servers

```
https://app.useonward.com/api/v1
```

## Security

### api_key

Type: apiKey
In: header
Name: X-API-Key

## Download OpenAPI description

[Onward API](https://docs.useonward.com/_bundle/apis/onward.yaml)

## Orders

Your customers orders, including the information necessary for Onward to insure and handle claims.

### Create an order

 - [POST /orders](https://docs.useonward.com/apis/onward/orders/createorder.md): When a customer places an order in your e-comm platform, create that order with its details in Onward.

### Update an order

 - [PATCH /orders/{shopOrderId}](https://docs.useonward.com/apis/onward/orders/updateorder.md): When order details change in your e-comm platform, update the order in Onward.

### Mark an order's insurance as refunded

 - [PATCH /orders/{shopOrderId}/refund_insurance](https://docs.useonward.com/apis/onward/orders/refundinsurance.md): When you refund the patient for the insurnace amount in your e-comm platform, update the order's insurance status in Onward.

### Add insurance to an existing order

 - [PATCH /orders/{shopOrderId}/add_insurance](https://docs.useonward.com/apis/onward/orders/addinsurance.md): If the customer did not purchase insurance during checkout, you can merchant-insure an order after-the-fact with this endpoint. Note: it is very important that you verify the status code of this request as not every order is eligible for insurance.

## Shipments

Physical shipments of items within an order and their tracking events.

### Create a shipment

 - [POST /shipments](https://docs.useonward.com/apis/onward/shipments/createshipment.md): When a you ship items for an order, create that shipment in Onward.

### Update a shipment

 - [PATCH /shipments/{shopShipmentId}](https://docs.useonward.com/apis/onward/shipments/updateshipment.md): When shipment details change in your e-comm platform, update the shipment in Onward.

### Create a shipment event

 - [POST /shipments/{shopShipmentId}/events](https://docs.useonward.com/apis/onward/shipments/createshipmentevent.md): When a shipment status changes (e.g. it is shipped or out for delivery), notify Onward of that event.

## Quotes

Insurance quotes for customers during checkout.

### Get an insurance quote

 - [POST /quotes](https://docs.useonward.com/apis/onward/quotes/createquote.md): During check out, get the insurance quote amount for the cart and add that amount to the order.

