> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/chord-oms/api-reference/quick-checkout.md).

# Quick Checkout

## Quick Checkout

> Create order and checkout. The X-Spree-Order-Token can be passed in the request header if the order is already created.

```json
{"openapi":"3.0.0","info":{"title":"OMS API","version":"1.1"},"tags":[{"name":"Quick Checkout"}],"servers":[{"url":"https://{host}/api","description":"Chord OMS instance","variables":{"host":{"default":"plant-staging.assembly-api.com","description":"Your tenant host, as configured in Chord OMS. The default is a Chord staging sandbox: replace it with your own host before making real requests."}}}],"security":[{"api-key":[]},{"order-token":[]}],"components":{"securitySchemes":{"api-key":{"type":"http","scheme":"bearer","description":"This is an admin level API token used for priviliged storefront\noperations. This should never be used in public contexts.\n"},"order-token":{"type":"apiKey","name":"X-Spree-Order-Token","in":"header","description":"This is a token that is assoicated with an order that allows operations\non that order. It is to be used as a means of authentication for guest\ncheckout sessions.\n"}},"schemas":{"order-input":{"title":"Order input","type":"object","oneOf":[{"$ref":"#/components/schemas/OrderInputProperties"},{"type":"object","properties":{"order":{"type":"object","allOf":[{"$ref":"#/components/schemas/OrderInputProperties"},{"type":"object","properties":{"gift_note":{"$ref":"#/components/schemas/gift_note"}}}]}}}]},"OrderInputProperties":{"type":"object","allOf":[{"$ref":"#/components/schemas/checkout-input"},{"type":"object","required":["line_items_attributes"],"properties":{"line_items_attributes":{"type":"array","description":"This field must be provided. If this is a new order, supply an\nempty array (`[]`).\n","items":{"$ref":"#/components/schemas/LineItemInput"}},"adjustments_attributes":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"The label/description of the adjustment."},"amount":{"type":"number","description":"The amount of the adjustment. Can be positive or negative."}}}},"gift_note_attributes":{"$ref":"#/components/schemas/gift_note"}}}]},"checkout-input":{"type":"object","title":"Checkout input","properties":{"coupon_code":{"type":"string"},"email":{"type":"string"},"referral_identifier":{"type":"string"},"special_instructions":{"type":"string"},"channel":{"type":"string"},"use_billing":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/metadata"},"bill_address_attributes":{"$ref":"#/components/schemas/address-input"},"ship_address_attributes":{"$ref":"#/components/schemas/address-input"},"payments_attributes":{"type":"array","items":{"$ref":"#/components/schemas/payment-input"}},"shipments_attributes":{"type":"array","items":{"$ref":"#/components/schemas/shipment-input"}}}},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"properties":{},"title":"Metadata","description":"A key-value store of additional information. A key can be removed by\nsetting its value to null.\n"},"address-input":{"type":"object","title":"Address Input","required":["address1","city"],"properties":{"name":{"type":"string","description":"The full name of the user. You must provide this field OR one of OR both of `firstname` and `lastname` for\nthe payload to be valid.\n\nThis field will override `firstname` and `lastname` if both are provided.\n"},"firstname":{"type":"string","description":"The first name of the user. This field will be ignored if `name` is provided.\n"},"lastname":{"type":"string","description":"The last name of the user. This field will be ignored if `name` is provided.\n"},"address1":{"type":"string"},"address2":{"type":"string","nullable":true},"city":{"type":"string"},"state_name":{"type":"string","description":"Either the name of the state (\"New York\") or it's abbreviation (\"NY\").\n\nThis field (or `state_id`) is required if [`/api/countries/{country_id}/states`](#/paths/list-country-states)\nreturns `\"states_required\": true` in it's body.\n"},"state_id":{"type":"integer","description":"This ID can be found by calling [`/api/countries/{country_id}/states`](#/paths/list-country-states).\n\nThis field (or `state_name`) is required if the above endpoint returns `\"states_required\": true`.\n"},"country_id":{"type":"integer","description":"This ID can be found by calling [`/api/countries`](#/paths/list-countries). Either `country_id` OR `country_iso`\nmust be provided for this payload to be valid.\n"},"country_iso":{"type":"string","description":"The [ISO 3166-1 Alpha-2 country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) that the\nuser resides in. This list can be fetched from [`/api/countries`](#/paths/list-countries), where the key is\n`iso`.\n\nThis field OR `country_id` must be provided for this payload to be valid.\n"},"zipcode":{"type":"string","nullable":true,"description":"This field is required if the country requires a ZIP code, like the United States (`233`).\n"},"phone":{"type":"string","nullable":true},"alternative_phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true}}},"payment-input":{"type":"object","title":"Payment input","properties":{"amount":{"type":"string"},"payment_method_id":{"type":"integer"},"payment_method":{"type":"string"},"source_attributes":{"type":"object","properties":{"number":{"type":"string"},"month":{"type":"integer"},"year":{"type":"integer"},"verification_value":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"cc_type":{"type":"string"},"gateway_customer_profile_id":{"type":"string"},"gateway_payment_profile_id":{"type":"string"},"last_digits":{"type":"string"},"name":{"type":"string"},"encrypted_data":{"type":"string"},"existing_card_id":{"type":"integer"},"wallet_payment_source_id":{"type":"integer"},"address_attributes":{"$ref":"#/components/schemas/address-input"}}}}},"shipment-input":{"type":"object","title":"Shipment input","properties":{"cost":{"type":"number"},"id":{"type":"integer"},"inventory_units":{"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"integer"}}}},"selected_shipping_rate_id":{"type":"integer"},"shipped_at":{"type":"string"},"special_instructions":{"type":"string"},"stock_location_id":{"type":"integer"},"tracking":{"type":"string"}}},"LineItemInput":{"type":"object","title":"Line item input","allOf":[{"$ref":"#/components/schemas/LineItemIdentifier"},{"type":"object","properties":{"quantity":{"type":"integer","description":"The quantity of the item to be added to the cart. If `0` is passed or `quantity`\nis omitted from the payload, the item is removed from the cart.\n"},"options":{"type":"object","description":"This field can be used to pass custom line item attributes. When used, it will force a new price calculation, unless `price` is one of the options.","properties":{"parts":{"type":"array","items":{"$ref":"#/components/schemas/part"}}}},"subscription_line_items_attributes":{"type":"array","items":{"$ref":"#/components/schemas/subscription-line-item"}},"dynamic_promotions_attributes":{"type":"array","items":{"$ref":"#/components/schemas/dynamic_promotion"}},"digital_purchases_attributes":{"type":"array","items":{"type":"object","properties":{"metadata":{"type":"object","properties":{"auto_redeem":{"type":"boolean"}}}}}}}}]},"LineItemIdentifier":{"type":"object","oneOf":[{"title":"sku","type":"object","required":["sku"],"properties":{"sku":{"type":"string"}}},{"title":"variant_id","type":"object","required":["variant_id"],"properties":{"variant_id":{"type":"integer"}}},{"title":"id","type":"object","description":"The existing line item ID of the item in the order","required":["id"],"properties":{"id":{"type":"integer"},"variant_id":{"type":"integer"},"sku":{"type":"string"}}}]},"part":{"type":"object","title":"Part within a parts array","properties":{"sku":{"type":"string","description":"SKU of the variant in the bundle"},"quantity":{"type":"integer","description":"The quantity of variant in this bundle"},"price":{"type":"number","format":"float","description":"The price of the variant in this bundle"}}},"subscription-line-item":{"description":"","title":"Subscription line item","type":"object","properties":{"id":{"type":"number"},"_destroy":{"type":"boolean"},"quantity":{"type":"number"},"interval_length":{"$ref":"#/components/schemas/IntervalLength"},"interval_units":{"$ref":"#/components/schemas/IntervalUnit"},"end_date":{"type":"string"},"interval":{"type":"string","minLength":1},"sku":{"type":"string","minLength":1},"product_slug":{"type":"string","minLength":1},"subscription_type":{"type":"string"},"variant_id":{"type":"number"},"product_id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"string"},"display_price":{"type":"string"},"options_text":{"type":"string"},"images":{"type":"array","items":{"$ref":"#/components/schemas/image"}},"one_time":{"type":"boolean","description":"Indicates this is a one-time addition to the next installment"},"one_time_replace":{"type":"boolean","description":"Indicates this item replaces an existing subscription item for one installment"},"replaces_subscribable_id":{"type":"number","description":"When one_time_replace is true, the variant_id of the item being replaced"}}},"IntervalLength":{"type":"number","minimum":1,"description":"How many times a subscription should be fulfilled for a given\ninterval unit. Here are some examples.\n\n- Length = 1 and unit = `month` == once a month\n- Length = 2 and unit = `week` == every two weeks\n- Length = 1 and unit = `year` == once a year\n"},"IntervalUnit":{"type":"string","enum":["day","week","month","year"],"description":"The measurement of time applied to the interval unit of how often a\nsubscription is fulfilled.\n"},"image":{"type":"object","properties":{"alt":{"type":"string"},"attachment_content_type":{"type":"string"},"attachment_file_name":{"type":"string"},"attachment_height":{"type":"integer"},"attachment_updated_at":{"type":"string"},"attachment_width":{"type":"integer"},"id":{"type":"integer"},"large_url":{"type":"string"},"mini_url":{"type":"string"},"position":{"type":"integer"},"product_url":{"type":"string"},"small_url":{"type":"string"},"type":{"type":"string"},"viewable_id":{"type":"integer"},"viewable_type":{"type":"string"}},"title":"Image"},"dynamic_promotion":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}},"gift_note":{"type":"object","title":"Gift Note","nullable":true,"description":"An optional note to attach to the order. For some fulfillment services,\nthis note might be printed and packaged with the order.\n","properties":{"from":{"type":"string"},"recipient":{"type":"string"},"note":{"type":"string"}}}},"responses":{"invalid-api-key":{"description":"Invalid API Key provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"paths":{"/quick_checkouts":{"post":{"summary":"Quick Checkout","description":"Create order and checkout. The X-Spree-Order-Token can be passed in the request header if the order is already created.","operationId":"quick-checkout","tags":["Quick Checkout"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/order-input"}}}},"parameters":[{"in":"header","name":"Origin","schema":{"type":"string","format":"url"},"required":true}],"responses":{"201":{"description":"","headers":{"Location":{"schema":{"type":"string","nullable":true}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"order_number":{"type":"string"},"order_token":{"type":"string"},"client_secret":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/invalid-api-key"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/chord-oms/api-reference/quick-checkout.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
