Create Operation
The Create operation is made in response to the creation of a Fast order by a Shopper. A Fast order is created when a Shopper clicks the Fast Checkout button on any page (e.g. PDP, mini-cart, checkout page, etc).
Create 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"
}
}Create Response
Success (200)
A successful response.
Response Schema: application/json
| type | string (v1EntityType) The type of entity being created. |
object (v1CreateResponseSegment) Fast order data entity. | |
object (v1UUID) The idempotency key of request. |
{- "type": "ENTITY_TYPE_UNSPECIFIED",
- "order": {
- "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"
}
}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 Create operation to the Seller.
Create a Cart
Create a Cart
A request to create a cart is fired when a Shopper clicks the Fast checkout button anywhere (PDP, Cart, Affiliate page). In Fast, a "cart" is an Order entity with a "status" equal to ORDER_STATUS_CART.
Request
{- "type": "ENTITY_TYPE_ORDER",
- "order": {
- "is_cart": true,
- "order": {
- "id": {
- "value": "eb3b8e18-930d-4213-92a0-4993f9e536a8"
}, - "order_type": "ORDER_TYPE_CART",
- "status": "ORDER_STATUS_CART",
- "bill_to": { },
- "lines": [
- {
- "id": {
- "value": "32dc17ee-ebff-40f8-87c5-b83f838d79d1"
}, - "external_product_id": 112,
- "quantity": 1,
- "subtotal_amount": 0,
- "tax_amount": 0,
- "total_amount": 0
}
]
}
}
}CreateRequest_Order_Cart
Response
{- "order": {
- "order": {
- "id": {
- "value": "eb3b8e18-930d-4213-92a0-4993f9e536a8"
}, - "external_id": "a98a387e-02ec-41a8-a38e-e3ca5fb0548d",
- "order_type": 1,
- "currency_code": "USD",
- "bill_to": { },
- "lines": [
- {
- "id": {
- "value": "32dc17ee-ebff-40f8-87c5-b83f838d79d1"
}, - "external_id": "d3d6eca1-1697-4ad2-6f369364f75b"
}
], - "total_amount": 29.99,
- "sub_total": 29.99,
- "total_discounts": 0
}
}
}