# Create Order Flow

<figure><img src="/files/PKqMxz2IkWbxJVS4YFWO" alt=""><figcaption></figcaption></figure>

For merchants, the "**Create Order Flow"** involves several steps:

**Merchant Step 1:** Login Merchants initiate the process by logging in using their username and password. This authentication step verifies their credentials and generates a token for subsequent API requests.

**Merchant Step 2**: Get Quote Premium After successful login, merchants retrieve a quote premium for the desired product. They send a query to the API with parameters such as SKU number, base price, and net price. The API returns detailed information about the product, including its ID, type, category, price, premium package options, and other relevant data.

**Merchant Step 3**: Create Order Once the quote premium is obtained, merchants proceed to create the order. They send a mutation to the API, providing necessary parameters such as customer ID or details, product ID or details, coverage start date, package option ID, serial number, and document IDs (if applicable). The API processes the mutation, creating the order and returning important details such as the order ID, policy ID, premium amount, coverage dates, creation timestamp, status, customer information, product information, package details, and package option details.

In addition, if integrated with a blockchain, merchants can include further steps to interact with the blockchain layer. This may involve retrieving transaction hashes, block numbers, or other relevant data associated with the order creation.

By following these steps, merchants can seamlessly create orders within the system. The login process ensures secure authentication, obtaining the quote premium provides accurate pricing information, and creating the order captures all necessary details.The integration with the blockchain layer adds transparency and immutability to the transaction data, enhancing trust and traceability in the redemption process.

Please note that the provided flow assumes a general process and may require adjustments to align with specific implementation details and requirements.

Explore our GraphQL API integration pages to access the complete documentation and example code, empowering you to seamlessly integrate with our system and unlock the full potential of our API. Visit the full documentation for Covest Warranty's GraphQL API here:

{% embed url="<https://warranty-docs.covestlabs.com/>" %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.covestlabs.com/covest-warranty/api-diagrams/create-order-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
