> ## Documentation Index
> Fetch the complete documentation index at: https://docs.propaga.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Onboarding

# Corner Store Onboarding

To onboard a corner store, this endpoint must be called. Before that, the `create-verification` use case must be invoked to obtain the `verificationId` required by this endpoint.

<Card title="Create verification use case" href="/api-reference/account/create-verification-code">
  Get more information about how call verification use-case
</Card>

### Important Considerations:

To send images to this endpoint, the base64 content of the image and its file extension must be provided. The optimal requirements for sending images are:

* **Clarity and Quality**: Use clear, high-quality images without excessive shadows.
* **Positioning**: The subject's face should be centered and unobstructed by objects such as glasses, hats, or face masks. The entire face must be visible.
* **Size**: The recommended image size is between 250 KB and 1 MB.
* **Format**: We recommend using JPEG or PNG formats.
* **Colors**: The image must be in color, not black and white.
* **Dimensions**: The image should have a minimum width of 750 pixels.
* **Document Coverage (for INE)**: The document should cover at least 70% of the total image area.

## How to Use This Endpoint

To use this endpoint, follow these steps:

1. First, call the `create-verification` use case to obtain the `verificationId`.
2. Next, use this endpoint to send the images and corner store information using the following request body example:

```json theme={null}
{
    "step": "DOCUMENT_IMAGE_FRONTAL",
    "document": {
        "fileExtension": "png",
        "base64Content": "base64 encoded content of the image"
    }
}
```

3. Then, you need to call this endpoint again to send the information of the corner store, following the next body example:

```json theme={null}
{
    "step": "CORNER_STORE_INFORMATION",
    "information": {
        "cornerStoreType": "GROCERY_STORE",
        "businessLifetime": "LESS_THAN_ONE_YEAR",
        "ownershipStatus": "SOLE_PROPRIETOR",
        "cornerStoreName": "Corner store name",
        "cornerStoreAddress": "Corner store address",
        "localeOwner": "PROPIO"
    }
}
```

4. Finally, you need to notify when user finished the onboarding, following the next body example:

```json theme={null}
{
    "step": "COMPLETED"
}
```

## Path parameters

<ParamField path="userId" type="string" required>
  Propaga's user id
</ParamField>

<ParamField path="verificationId" type="string" required>
  Verification id generated when you call the create verification use-case
</ParamField>

## Body

<ParamField body="step" type="string" default="DOCUMENT_IMAGE_FRONTAL" required>
  <Expandable title="Step values">
    <ParamField body="DOCUMENT_IMAGE_FRONTAL" />

    <ParamField body="DOCUMENT_IMAGE_BACK" />

    <ParamField body="SELFIE_IMAGE" />

    <ParamField body="STORE_IMAGE" />

    <ParamField body="CORNER_STORE_INFORMATION" />

    <ParamField body="COMPLETED" />
  </Expandable>
</ParamField>

<ParamField body="document" type="object" optional>
  <Expandable title="Properties">
    <ParamField body="fileExtension" type="string" required>
      <Expandable title="File extension values">
        <ParamField body="png" />

        <ParamField body="jpg" />

        <ParamField body="jpeg" />
      </Expandable>
    </ParamField>

    <ParamField body="base64Content" type="string" required>
      Base64 encoded content of the image
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="information" type="object" optional>
  <Expandable title="Properties">
    <ParamField body="cornerStoreType" type="string" required>
      <Expandable title="Store type values">
        <ParamField body="ABARROTES" />

        <ParamField body="CAFE_INTERNET" />

        <ParamField body="CARNICERIA" />

        <ParamField body="CREMERIA" />

        <ParamField body="DULCERIA" />

        <ParamField body="FARMACIA" />

        <ParamField body="FERRETERIA" />

        <ParamField body="MISCELÁNEA" />

        <ParamField body="PAPELERIA" />

        <ParamField body="RESTAURANTE" />

        <ParamField body="POLLERÍA" />
      </Expandable>
    </ParamField>

    <ParamField body="businessLifetime" type="string" required>
      <Expandable title="Business lifetime values">
        <ParamField body="LESS_THAN_SIX_MONTHS" />

        <ParamField body="LESS_THAN_ONE_YEAR" />

        <ParamField body="ONE-TO-TWO_YEARS" />

        <ParamField body="TWO-TO-THREE_YEARS" />

        <ParamField body="THREE-TO-FIVE_YEARS" />

        <ParamField body="MORE_THAN_FIVE_YEARS" />
      </Expandable>
    </ParamField>

    <ParamField body="ownershipStatus" type="string" required>
      <Expandable title="Ownership status values">
        <ParamField body="DUEÑO" />

        <ParamField body="EMPLEADO" />
      </Expandable>
    </ParamField>

    <ParamField body="cornerStoreName" type="string" required>
      Corner store's name
    </ParamField>

    <ParamField body="cornerStoreAddress" type="string" required>
      Corner store's address
    </ParamField>

    <ParamField body="localeOwner" type="string" required>
      <Expandable title="Locale owner values">
        <ParamField body="PROPIO" />

        <ParamField body="ALQUILADO" />
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>
