Read Operation
The Read operation is used by Fast to return information on a Fast order.
Read Request
Request Body schema: application/json
A read request.
| app_id | string The application ID for your store registered with Fast. |
object (v1UUID) The idempotency key of request. Ensure that your operations are idempotent against this field | |
| type | string (v1EntityType) Enum: "ENTITY_TYPE_UNSPECIFIED" "ENTITY_TYPE_ORDER" "ENTITY_TYPE_SHIPPING_OPTION" "ENTITY_TYPE_USER" "ENTITY_TYPE_SHIPPING_ZONES" |
object (v1ReadOrderRequestSegment) Object containing the order information. | |
| shipping_zones | object (v1ReadShippingZonesRequestSegment) The geographical area (e.g. region ZIP code etc.) that physical goods will ship to. |
{- "app_id": "string",
- "request_id": {
- "value": "string"
}, - "type": "ENTITY_TYPE_UNSPECIFIED",
- "order": {
- "is_cart": true,
- "order_id": {
- "value": "string"
}, - "external_order_id": "string"
}, - "shipping_zones": { }
}Read Response
Success (200)
A successful response.
Response Schema: application/json
object (v1UUID) The idempotency key of request. | |
| type | string (v1EntityType) The type of entity being created. |
object (v1ReadOrderResponseSegment) Fast order data entity. | |
object (v1ReadUserResponseSegment) | |
object (v1ReadShippingZonesResponseSegment) The geographical area (e.g. region ZIP code etc.) that physical goods will ship to. |
{- "request_id": {
- "value": "string"
}, - "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"
}
}, - "user": {
- "user": {
- "external_user_id": "string",
- "email": "string",
- "name": "string"
}
}, - "shipping_zones": {
- "shipping_zones": [
- {
- "country_iso2": "string",
- "subdivision_iso2": "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 use cases that will trigger Fast to call the Read operation to the Seller.
Read a Cart
Read a Cart
Fast makes a read request to the existing platform cart so that it can get the item information to create a Fast order. This call is triggered when a user clicks the Fast Checkout button from the mini-cart or cart page.
Request
{- "type": "ENTITY_TYPE_ORDER",
- "order": {
- "is_cart": true,
- "external_order_id": "OPnjkIN3mBgF2k6WhbADkTfyOlK8FEbh"
}
}Response
{- "order": {
- "order": {
- "id": {
- "value": "as5920783-453d-6ee4-ac3c-f23af36ff819"
}, - "external_id": "OPnjkIN3mBgF2k6WhbADkTfyOlK8FEbh",
- "order_type": "ORDER_TYPE_CART",
- "currency_code": "USD",
- "status": "ORDER_STATUS_CART",
- "lines": [
- {
- "id": {
- "value": "5c5e373a-c675-447c-8e1c-fda798c5f31c"
}, - "external_id": 6297,
- "external_product_id": 1797,
- "external_variant_id": "1797-BK-M",
- "quantity": 1,
- "subtotal_amount": 50,
- "total_amount": 37.5,
- "name": "Black M",
- "image_url": null,
- "fulfillment_mode": "ITEM_FULFILLMENT_MODEL_PHYSICAL"
}
], - "total_amount": 37.5,
- "sub_total": 37.5,
- "total_discounts": 0,
- "total_tax": 0,
- "total_shipping": 0
}
}
}Read an Order
Read an Order
Fast makes a read request to an existing order to retrieve the order information. Seller->Fast API communication within the Order Management Service triggers a request to read an order.
Request
{- "app_id": "088fdade-8809-471c-89c2-f429fa844af2",
- "type": "ENTITY_TYPE_ORDER",
- "order": {
- "external_order_id": 585
}
}Response
{- "type": "ENTITY_TYPE_ORDER",
- "order": {
- "order": {
- "external_id": 585,
- "order_type": "ORDER_TYPE_ORDER",
- "currency_code": "USD",
- "bill_to": {
- "first_name": "Solutions",
- "last_name": "Team",
- "phone": 18005551212,
- "address_1": "100 Park Avenue",
- "city_locality": "New York",
- "state_province": "New York",
- "state_province_code": "NY",
- "country": "US",
- "postal_code": 10017
}, - "lines": [
- {
- "external_product_id": 1556,
- "external_variant_id": 6418,
- "quantity": 1,
- "quantity_fulfilled": 0,
- "unit_price": 22,
- "discounted_unit_price": 0,
- "line_discount_amount": 0,
- "subtotal_amount": 22,
- "tax_amount": 0,
- "total_amount": 22,
- "discounts": [
- {
- "applied": false
}
], - "name": "Radiant Tee",
- "fulfillment_mode": "ITEM_FULFILLMENT_MODEL_PHYSICAL"
}, - {
- "external_product_id": 1542,
- "external_variant_id": 6419,
- "quantity": 1,
- "quantity_fulfilled": 0,
- "unit_price": 0,
- "discounted_unit_price": 0,
- "line_discount_amount": 0,
- "subtotal_amount": 0,
- "tax_amount": 0,
- "total_amount": 0,
- "discounts": [
- {
- "applied": false
}
], - "name": "Radiant Tee-XS-Orange",
- "fulfillment_mode": "ITEM_FULFILLMENT_MODEL_PHYSICAL"
}, - {
- "external_product_id": 1556,
- "external_variant_id": 6420,
- "quantity": 1,
- "quantity_fulfilled": 0,
- "unit_price": 22,
- "discounted_unit_price": 0,
- "line_discount_amount": 0,
- "subtotal_amount": 22,
- "tax_amount": 0,
- "total_amount": 22,
- "discounts": [
- {
- "applied": false
}
], - "name": "Radiant Tee",
- "fulfillment_mode": "ITEM_FULFILLMENT_MODEL_PHYSICAL"
}, - {
- "external_product_id": 1548,
- "external_variant_id": 6421,
- "quantity": 1,
- "quantity_fulfilled": 0,
- "unit_price": 0,
- "discounted_unit_price": 0,
- "line_discount_amount": 0,
- "subtotal_amount": 0,
- "tax_amount": 0,
- "total_amount": 0,
- "discounts": [
- {
- "applied": false
}
], - "name": "Radiant Tee-M-Orange",
- "fulfillment_mode": "ITEM_FULFILLMENT_MODEL_PHYSICAL"
}
], - "shipment_plans": [
- {
- "id": {
- "value": "me"
}, - "external_id": "me",
- "ship_to": {
- "first_name": "Solutions",
- "last_name": "Team",
- "phone": 18005551212,
- "address_1": "100 Park Avenue",
- "city_locality": "New York",
- "state_province": "New York",
- "state_province_code": "NY",
- "country": "US",
- "postal_code": 10017
}, - "lines": [
- {
- "quantity": 1,
- "external_id": 998
}, - {
- "quantity": 1,
- "external_id": 999
}, - {
- "quantity": 1,
- "external_id": 1000
}, - {
- "quantity": 1,
- "external_id": 1001
}
], - "selected_option": {
- "external_id": "flatrate_flatrate",
- "name": "Flat Rate - Fixed",
- "cost": 10,
- "tax": 0,
- "total": 10
}, - "available_options": null
}
], - "total_amount": 54,
- "sub_total": 44,
- "total_discounts": 0,
- "total_tax": 0,
- "total_shipping": 10,
- "short_order_id": 585
}
}, - "user": {
- "user": {
- "first_name": "Solutions",
- "last_name": "Team",
- "phone": 18005551212
}
}
}Read a Shipping Zone
Read a Shipping Zone
Fast makes this call to check for any restricted countries so that error messaging can show immediately when a Shopper tries to ship somewhere invalid. That way, restricted countries or states/provinces are sent to Fast early in the process.
This is triggered when a Shopper enters or changes a shipping address on their Fast order.
Request
{- "app_id": "088fdade-8809-471c-89c2-f429fa844af2",
- "type": "ENTITY_TYPE_SHIPPING_ZONES"
}Response
{- "type": "ENTITY_TYPE_SHIPPING_ZONES",
- "shipping_zones": {
- "shipping_zones": [
- {
- "country_iso2": "US"
}, - {
- "country_iso2": "GB"
}
]
}
}