# Request Flow

### Request API Workflow

#### 1) [Create a Request](https://vudy.gitbook.io/vudy-docs/api-reference/request-api/create-request)

Keep track of both the `id` field that Vudy provides (this is the <mark style="color:green;">`VUDY_ID`</mark>) and your own `vendorId` field for your own system.

#### 2) Embed HTML on Your Site

Integrate the provided embed code into your website to display the requested data.

```html
<iframe 
    src="https://vudy.me/embed/request/<VUDY_ID>?dtheme=light&backgroundColor=transparent&primaryColor=%23FF5733&secondaryColor=%238A8A8A&textColor=%23333333&cardBackground=%23FFFFFF&borderColor=%23E5E5E5" 
    width="100%" 
    height="600px" 
    frameborder="0" 
/>
```

**2a. ID Setting**

Ensure to insert the specific request ID in the URL is the provided `request.id`  given in the response\
`https://vudy.me/embed/request/{REQUEST_ID}?param=spec`

**2b. Theme Customization**

Customize the appearance using these optional parameters in the search params:

```typescript
type Theme {
    theme?: "light" | "dark";  
    backgroundColor?: string;
    primaryColor?: string;
    secondaryColor?: string;
    textColor?: string;
    cardBackground?: string;
    borderColor?: string;
}
```

Colors are preferably set with a hex encoding:  `#FFAACC` or any <mark style="color:purple;">CSS</mark> compatible encoding.

#### 3. Diagram

Here's a basic flow illustrating the API request process:

<figure><img src="https://3755070279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8Se5KldfNUgoQ8LWnoTs%2Fuploads%2F1CwDBmc1BzPDwrgMm6Ks%2Frequest%20API%20flow.png?alt=media&#x26;token=3c57bd85-4e93-4d19-a60b-937048e4fda7" alt=""><figcaption><p>Notice that confirmation email is provided by Vudy directly. If you want to turn that functionality off, please <a href="../contact/support">contact our team</a></p></figcaption></figure>
