Delete Operation
The Delete operation is called to clear carts from either Fast or the eCommerce platform in cases such as order cancellation prior to placement, cart abandonment, or initiating a Fast checkout from a platform cart page.
Delete Request
Request Body schema: application/json
A create request.
| type | string (v1EntityType) The type of entity being created. |
| app_id | string The application ID for your store registered with Fast. |
object (v1CreateRequestSegment) Object containing the order information. | |
object (v1UUID) |
{- "type": "ENTITY_TYPE_UNSPECIFIED",
- "app_id": "string",
- "order": {
- "is_cart": true,
- "order": {
- "id": {
- "value": "string"
}, - "external_id": "string",
- "user_id": "string",
- "order_type": "ORDER_TYPE_CART",
- "currency_code": "string",
- "status": "ORDER_STATUS_CART",
- "bill_to": {
- "id": {
- "value": "string"
}, - "first_name": "string",
- "last_name": "string",
- "middle_name": "string",
- "company": "string",
- "email": "string",
- "phone": "string",
- "address_1": "string",
- "address_2": "string",
- "city_locality": "string",
- "state_province": "string",
- "state_province_code": "string",
- "country": "string",
- "country_code": "string",
- "postal_code": "string"
}, - "lines": [
- {
- "id": {
- "value": "string"
}, - "external_id": "string",
- "external_product_id": "string",
- "external_variant_id": "string",
- "external_options": [
- {
- "key": "string",
- "value": "string"
}
], - "customizations": [
- {
- "key": "string",
- "value": "string"
}
], - "quantity": 0,
- "quantity_fulfilled": 0,
- "unit_price": "string",
- "discounted_unit_price": "string",
- "line_discount_amount": "string",
- "subtotal_amount": "string",
- "tax_amount": "string",
- "total_amount": "string",
- "discounts": [
- {
- "code": "string",
- "description": "string",
- "origin": "DISCOUNT_ORIGIN_USER",
- "type": "DISCOUNT_TYPE_MISC",
- "applied": true,
- "total_amount": "string"
}
], - "name": "string",
- "description": "string",
- "image_url": "string",
- "fulfillment_mode": "ITEM_FULFILLMENT_MODEL_PHYSICAL"
}
], - "shipment_plans": [
- {
- "id": {
- "value": "string"
}, - "external_id": "string",
- "ship_to": {
- "id": {
- "value": "string"
}, - "first_name": "string",
- "last_name": "string",
- "middle_name": "string",
- "company": "string",
- "email": "string",
- "phone": "string",
- "address_1": "string",
- "address_2": "string",
- "city_locality": "string",
- "state_province": "string",
- "state_province_code": "string",
- "country": "string",
- "country_code": "string",
- "postal_code": "string"
}, - "lines": [
- {
- "id": {
- "value": null
}, - "quantity": 0
}
], - "selected_option": {
- "id": {
- "value": "string"
}, - "external_id": "string",
- "name": "string",
- "shipment_type": "SHIPPING_OPTION_TYPE_IN_STORE_PICKUP",
- "cost": "string",
- "tax": "string",
- "total": "string",
- "carrier": "string",
- "service_level": "string"
}, - "available_options": [
- {
- "id": {
- "value": null
}, - "external_id": "string",
- "name": "string",
- "shipment_type": "SHIPPING_OPTION_TYPE_IN_STORE_PICKUP",
- "cost": "string",
- "tax": "string",
- "total": "string",
- "carrier": "string",
- "service_level": "string"
}
], - "shipments": [
- {
- "carrier": "string",
- "tracking_number": "string",
- "estimated_delivery_date": "string",
- "lines": [
- null
]
}
]
}
], - "coupons": [
- {
- "code": "string",
- "description": "string",
- "origin": "DISCOUNT_ORIGIN_USER",
- "type": "DISCOUNT_TYPE_MISC",
- "applied": true,
- "total_amount": "string"
}
], - "total_amount": "string",
- "sub_total": "string",
- "total_discounts": "string",
- "total_tax": "string",
- "total_shipping": "string",
- "refunds": [
- {
- "id": {
- "value": "string"
}, - "external_id": "string",
- "reason": "string",
- "use_original_method": true,
- "lines": [
- {
- "id": {
- "value": null
}, - "quantity": 0
}
], - "refund_date": "string",
- "amount": "string",
- "tax": "string",
- "shipping": "string"
}
], - "custom_values": [
- {
- "key": "string",
- "value": "string"
}
], - "user_note": "string",
- "store_note": "string",
- "fast_note": "string"
}
}, - "request_id": {
- "value": "string"
}
}Delete Response
The response to delete should be empty if no issues occurred, or return one of the listed error codes in the case something went wrong.
Success (200)
{}Error
An unexpected error response.
Response Schema: application/json
| code | integer <int32> |
| message | string |
Array of objects (protobufAny) |
{- "code": 0,
- "message": "string",
- "details": [
- {
- "type_url": "string",
- "value": "string"
}
]
}Use Cases
Below are business cases that will trigger Fast to call the Delete operation to the Seller.
Delete a Fast Cart
Delete a Fast Cart
If a Shopper chooses to cancel their order, the pending cart will be deleted.
For anonymous / first-time Fast Shoppers that don't complete their profile or make order updates for an hour, Fast will consider it an abandoned cart and send a request to clear the cart from the eCommerce platform
If a Shopper initiates Fast checkout from the platform cart page, we make a call to delete the platform cart upon successful Fast order creation (but not timing window complete) to avoid duplicate orders. This will include the platform cart id in the external_order_id field to distinguish between a request to delete the Fast Checkout cart.
Request
{- "app_id": "088fdade-8809-471c-89c2-f429fa844af2",
- "type": "ENTITY_TYPE_ORDER",
- "order": {
- "is_cart": true,
- "external_id": "c8XyP8tIPIOluGmOgOv1D6bABUScTyvh"
}
}Response
{}