Update Operation

The Update operation is made in response to Shopper updates of the Order object. Shoppers can update orders in any sequence (i.e. billing first, shipping first, etc). Each action will make a call to update the eCommerce platform. Fast requires an updated cart from the platform based on changes submitted.

The update API is able to update several different top level components of the order. In the request we send to your server, we will supply only the incremental data. If we send you data, you should check that the item being updated/added is not being duplicated accidentally. We provide unique ids on each item.

We also use the update endpoint to update the status of an order (i.e from a cart to an order, from pending to pending fulfillment, etc.).

Update Request

POST
/fast/v1/update

Request Body schema: application/json

An update request.

app_id
string

The application ID for your store registered with Fast.

object (v1UUID)
type
string (v1EntityType)
Enum: "ENTITY_TYPE_UNSPECIFIED" "ENTITY_TYPE_ORDER" "ENTITY_TYPE_SHIPPING_OPTION" "ENTITY_TYPE_USER" "ENTITY_TYPE_SHIPPING_ZONES"
object (v1UpdateOrderRequestSegment)
application/json
{
  • "app_id": "string",
  • "request_id": {
    },
  • "type": "ENTITY_TYPE_UNSPECIFIED",
  • "order": {
    }
}

Update Response

Success (200)

A successful response.

Response Schema: application/json
object (v1UUID)
type
string (v1EntityType)
Enum: "ENTITY_TYPE_UNSPECIFIED" "ENTITY_TYPE_ORDER" "ENTITY_TYPE_SHIPPING_OPTION" "ENTITY_TYPE_USER" "ENTITY_TYPE_SHIPPING_ZONES"
object (v1UpdateOrderResponseSegment)
application/json
{
  • "request_id": {
    },
  • "type": "ENTITY_TYPE_UNSPECIFIED",
  • "order": {
    }
}

Error

An unexpected error response.

Response Schema: application/json
code
integer <int32>
message
string
Array of objects (protobufAny)
application/json
{
  • "code": 0,
  • "message": "string",
  • "details": [
    ]
}

Use Cases

Below are business cases that will trigger Fast to call the Update operation to the Seller.

Add an Item to the Cart

Add an Item to the Cart

If Shoppers "Return to Store" to add an item to the cart in their Fast Checkout session, the entire Order object will need to be updated. This needs to check if inventory is available. The response should include changes to eligible shipping methods, coupons, etc. based on the new cart contents.

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Remove an Item from the Cart

Remove an Item from the Cart

If a Shopper removes a line item from the cart within the Fast Checkout modal or decreases the quantity to 0, the entire Order object will need to be updated. The response should include changes to eligible shipping methods, coupons, etc. based on new cart contents. To remove a cart item, the update request is sent with the item id and a quantity of zero (the quantity attribute can be omitted entirely, as it's default value is zero).

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Update shipping address associated with an order

Update a Shipping Address Associated with an Order

If a Shopper updates their shipping address on the Fast order modal, the Order object is updated.

Request

{
  • "app_id": "088fdade-8809-471c-89c2-f429fa844af2",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Update Billing Address Associated with an Order

Update Billing Address Associated with an Order

If a Shopper updates the billing address associated with a cart, the Order object will need to be updated.

Request

{
  • "app_id": "088fdade-8809-471c-89c2-f429fa844af2",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Update Shipping Option Associated with an Order

Update Shipping Option Associated with an Order

If a Shopper updates the shipping option (i.e. ground, next day, etc), the Order object will need to be updated.

Request

{
  • "app_id": "088fdade-8809-471c-89c2-f429fa844af2",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Update Item Quantity

Update Item Quantity

If Shoppers "Return to Store" to change the quantity of items (add/remove) in their Fast checkout session, the entire Order object will need to be updated. This needs to check if inventory is available. The response should include changes to eligible shipping methods, coupons, etc. based on the new cart contents.

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Add a Coupon to the Cart

Add a Coupon to the Cart

If a Shopper adds a coupon to the cart, the Order object will need to be returned in full including the coupon attribute.

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Remove a Coupon from the Cart

Remove a Coupon from the Cart

If a Shopper removes a coupon, the coupon will need to be removed from the coupon attribute in the Order object, and the accurate total reflected.

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Convert a Cart to an Order

Convert a Cart to an Order

Once the checkout timer expires, you will receive an update request to convert the Order object from cart status to order status to reserve inventory (should not be exportable).

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Update Order Status

Update Order Status

An order status can be updated to one of the listed order statues.

After a cart has been converted to an order, the following status updates will occur:

Payment authorization

Once payment has been successfully authorized, you will receive an update request to ORDER_STATUS_BOOKED.

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Fraud Approved (Safe to export)

Once the fraud check has passed successfully, you will receive an update request to ORDER_STATUS_PENDING_FULFILLMENT.

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Auth/Fraud Rejection

If there is a failure in either payment authorization or fraud check, you will receive an update request to ORDER_STATUS_CANCELED. If this occurs after Booked status, it can be assumed to be for fraud reasons.

Request

{
  • "app_id": "31d7ff3a-0128-440e-a5a2-c1e10d4c2d83",
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}

Response

{
  • "type": "ENTITY_TYPE_ORDER",
  • "order": {
    }
}