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

# Update Onboarding Data

> Update merchant onboarding data after being declined

## Overview

Updates the onboarding data for a merchant using the onboarding reference number. This endpoint allows merchants to correct and resubmit their information after their application has been declined.

<Warning>
  **Status Requirement:** Regular users can only update merchants in **DECLINED** status. Upon successful update, the merchant's status changes to **PENDING** for re-review.
</Warning>

<Info>
  **Super Admin Exception:** Super Admins can update merchants in **APPROVED** status without changing the status.
</Info>

## Authentication

This endpoint requires JWT Bearer Token authentication.

```bash theme={null}
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
```

## Authorization Rules

| User Role                | Required Merchant Status | Result Status After Update  |
| ------------------------ | ------------------------ | --------------------------- |
| Regular User             | DECLINED                 | PENDING                     |
| Super Admin              | APPROVED                 | APPROVED (no status change) |
| Settlement/Checker Roles | N/A                      | Not Allowed                 |

## Path Parameters

<ParamField path="refNo" type="string" required>
  The onboarding reference number (UUID v4 format)

  **Format:** Valid UUID v4

  **Example:** `"550e8400-e29b-41d4-a716-446655440000"`

  <Note>
    Must match the authenticated user's business record. This is the `referenceNumber` returned from the [Onboard Merchant](/api-reference/onboarding/onboard-merchant) endpoint.
  </Note>
</ParamField>

## Request Body

All fields from the original onboarding request are required, except those marked as optional.

### Core Business Information

<ParamField body="legalName" type="string">
  Legal registered name of the business

  **Length:** 1-500 characters

  **Required for:** Non-STARTER business types

  **Example:** `"Acme Corporation Inc."`
</ParamField>

<ParamField body="merchantName" type="string" required>
  Trading name or DBA (Doing Business As) name

  **Length:** 1-500 characters

  **Example:** `"Acme Store"`
</ParamField>

<ParamField body="businessHandle" type="string">
  Unique business handle/slug for payment links

  **Pattern:** Alphanumeric characters, dashes, and underscores only

  **Required for:** Non-STARTER business types

  **Example:** `"acme-store"`

  <Warning>
    Must be unique across the system. If already taken, the request will fail.
  </Warning>
</ParamField>

<ParamField body="modeOfPayments" type="array" required>
  List of accepted payment modes

  **Min Items:** 1

  **Values:** `CREDIT_CARD`, `DEBIT_CARD`, `GCASH`, `GRABPAY`, `PAYMAYA`, `BANK_TRANSFER`

  **Example:** `["CREDIT_CARD", "DEBIT_CARD", "GCASH"]`
</ParamField>

<ParamField body="currency" type="string" required>
  Primary currency for transactions

  **Values:** `PHP`, `USD`

  **Example:** `"PHP"`
</ParamField>

<ParamField body="tin" type="string" required>
  Tax Identification Number

  **Length:** 1-20 characters

  **Pattern:** Numbers only

  **Example:** `"123456789012"`
</ParamField>

<ParamField body="industry" type="string" required>
  Business industry category

  **Length:** 1-200 characters

  **Example:** `"Retail"`
</ParamField>

<ParamField body="serviceDescription" type="string" required>
  Description of services or products offered

  **Example:** `"Online retail store selling electronics and gadgets"`
</ParamField>

<ParamField body="isBrickAndMortarStore" type="boolean" required>
  Whether the business has a physical store location

  **Example:** `true`
</ParamField>

### Optional Business Fields

<ParamField body="aubPartnerId" type="string">
  AUB (Asia United Bank) partner identifier

  **Example:** `"AUB123456"`
</ParamField>

<ParamField body="estimatedMonthlyGrossTransaction" type="string">
  Estimated monthly gross transaction volume

  **Example:** `"100000-500000"`
</ParamField>

<ParamField body="isWantPackworksWallet" type="boolean">
  Whether the merchant wants a Packworks wallet

  **Default:** `false`
</ParamField>

<ParamField body="isWantPayMayaWallet" type="boolean">
  Whether the merchant wants a PayMaya wallet

  **Default:** `false`
</ParamField>

<ParamField body="isWantPayMayaBankAccount" type="boolean">
  Whether the merchant wants a PayMaya bank account

  **Default:** `false`
</ParamField>

### Incorporators

<ParamField body="incorporators" type="array">
  List of business incorporators

  **Min Items:** 1, **Max Items:** 5

  **Applicable for:** Non-STARTER business types only

  <Expandable title="Incorporator Properties">
    <ParamField body="incorporators[].firstName" type="string" required>
      First name (1-100 characters, Unicode letters, spaces, hyphens, apostrophes)
    </ParamField>

    <ParamField body="incorporators[].middleName" type="string">
      Middle name (1-100 characters)
    </ParamField>

    <ParamField body="incorporators[].lastName" type="string" required>
      Last name (1-100 characters)
    </ParamField>

    <ParamField body="incorporators[].emailAddress" type="string" required>
      Email address (1-100 characters, valid email format)
    </ParamField>

    <ParamField body="incorporators[].contactNumber" type="string" required>
      Contact phone number (1-30 digits, numbers only)
    </ParamField>

    <ParamField body="incorporators[].dateOfBirth" type="string" required>
      Date of birth (ISO 8601 date format)
    </ParamField>

    <ParamField body="incorporators[].address" type="object" required>
      Address object with properties: `city`, `line1`, `buildingNameAndNumber`, `state`, `postalCode`, `barangay`
    </ParamField>
  </Expandable>
</ParamField>

### Signatories

<ParamField body="signatories" type="array">
  List of authorized signatories

  **Min Items:** 1, **Max Items:** 5

  <Expandable title="Signatory Properties">
    <ParamField body="signatories[].firstName" type="string" required>
      First name (1-100 characters)
    </ParamField>

    <ParamField body="signatories[].middleName" type="string">
      Middle name (1-100 characters)
    </ParamField>

    <ParamField body="signatories[].lastName" type="string" required>
      Last name (1-100 characters)
    </ParamField>

    <ParamField body="signatories[].position" type="string" required>
      Position/title (1-100 characters)
    </ParamField>
  </Expandable>
</ParamField>

### Address

<ParamField body="address" type="object" required>
  Business address information

  <Expandable title="Office Address (Required)">
    <ParamField body="address.office.city" type="string" required>
      City (1-100 characters)
    </ParamField>

    <ParamField body="address.office.line1" type="string" required>
      Street address (1-64 characters)
    </ParamField>

    <ParamField body="address.office.buildingNameAndNumber" type="string">
      Building name and number (1-200 characters)
    </ParamField>

    <ParamField body="address.office.state" type="string" required>
      Province/State (1-64 characters)
    </ParamField>

    <ParamField body="address.office.postalCode" type="string" required>
      Postal code (4-10 digits, numbers only)
    </ParamField>

    <ParamField body="address.office.contactNumber" type="string" required>
      Office contact number (1-30 digits, numbers only)
    </ParamField>

    <ParamField body="address.office.barangay" type="string" required>
      Barangay (1-200 characters)
    </ParamField>
  </Expandable>

  <Expandable title="Registered Address (Optional)">
    <ParamField body="address.registered" type="object">
      Registered business address (if different from office)

      Same properties as office address
    </ParamField>
  </Expandable>
</ParamField>

### Websites

<ParamField body="websites" type="object">
  Business online presence

  <Expandable title="Website Properties">
    <ParamField body="websites.businessWebsiteUrl" type="string">
      Main business website URL

      <Note>
        If provided, `isBusinessWebsiteUnderDevelopment` is required
      </Note>
    </ParamField>

    <ParamField body="websites.isBusinessWebsiteUnderDevelopment" type="boolean">
      Whether the website is still under development
    </ParamField>

    <ParamField body="websites.facebookUrl" type="string">
      Facebook page URL
    </ParamField>

    <ParamField body="websites.twitterUrl" type="string">
      Twitter/X profile URL
    </ParamField>

    <ParamField body="websites.instagramUrl" type="string">
      Instagram profile URL
    </ParamField>

    <ParamField body="websites.tiktokUrl" type="string">
      TikTok profile URL
    </ParamField>
  </Expandable>
</ParamField>

### Representatives

<ParamField body="representatives" type="object" required>
  Authorized representatives

  <Expandable title="Authorized Representative (Required)">
    <ParamField body="representatives.authorized.firstName" type="string" required>
      First name (1-100 characters)
    </ParamField>

    <ParamField body="representatives.authorized.middleName" type="string">
      Middle name (1-100 characters)
    </ParamField>

    <ParamField body="representatives.authorized.lastName" type="string" required>
      Last name (1-100 characters)
    </ParamField>

    <ParamField body="representatives.authorized.emailAddress" type="string" required>
      Email address (1-100 characters, valid email)
    </ParamField>

    <ParamField body="representatives.authorized.contactNumber" type="string" required>
      Contact phone number (1-30 digits, numbers only)
    </ParamField>

    <ParamField body="representatives.authorized.dateOfBirth" type="string" required>
      Date of birth (ISO 8601 date format)
    </ParamField>

    <ParamField body="representatives.authorized.position" type="string" required>
      Job position/title (1-100 characters)
    </ParamField>

    <ParamField body="representatives.authorized.tin" type="string">
      Tax Identification Number (1-20 digits, numbers only)
    </ParamField>

    <ParamField body="representatives.authorized.sss" type="string">
      Social Security System number (exactly 10 digits)
    </ParamField>

    <ParamField body="representatives.authorized.mothersMaidenName" type="string">
      Mother's maiden name (max 255 characters)
    </ParamField>

    <ParamField body="representatives.authorized.gender" type="string">
      Gender (`MALE` or `FEMALE`)
    </ParamField>
  </Expandable>

  <Expandable title="Escalation Representative (Optional)">
    <ParamField body="representatives.escalation" type="object">
      Secondary/escalation contact representative

      **All fields required if provided:** `firstName`, `lastName`, `emailAddress`, `contactNumber`, `dateOfBirth`, `tin` (9 digits), `sss` (10 digits), `position`
    </ParamField>
  </Expandable>
</ParamField>

### Bank Accounts

<ParamField body="banks" type="array" required>
  List of bank accounts for settlement

  **Min Items:** 1, **Max Items:** 2

  <Expandable title="Bank Account Properties">
    <ParamField body="banks[].accountDepositType" type="string" required>
      Type of deposit account

      **Values:** `BANK`, `PAYMAYA`, `GCASH`, `NO_ACCOUNT`
    </ParamField>

    <ParamField body="banks[].accountType" type="string">
      Type of bank account

      **Values:** `SAVINGS`, `CHECKING_CURRENT`

      **Required when:** `accountDepositType` is `BANK`
    </ParamField>

    <ParamField body="banks[].bankName" type="string">
      Name of the bank (1-500 characters)

      **Required when:** `accountDepositType` is not `NO_ACCOUNT`
    </ParamField>

    <ParamField body="banks[].accountName" type="string">
      Name on the bank account (1-500 characters)

      **Required when:** `accountDepositType` is not `NO_ACCOUNT`
    </ParamField>

    <ParamField body="banks[].accountNumber" type="string">
      Bank account number (1-500 characters)

      **Required when:** `accountDepositType` is not `NO_ACCOUNT`

      <Info>
        Will be encrypted before storage
      </Info>
    </ParamField>

    <ParamField body="banks[].currency" type="string" required>
      Currency of the bank account (`PHP` or `USD`)
    </ParamField>

    <ParamField body="banks[].preferredSettlementRail" type="string">
      Preferred settlement rail for fund transfers

      **Values:** `instapay`, `pesonet`
    </ParamField>

    <ParamField body="banks[].bankCode" type="string">
      SWIFT/BIC code (8-11 alphanumeric characters)

      **Pattern:** `^[A-Z0-9]{8,11}$`
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  BEARER_TOKEN="your_jwt_token_here"
  REF_NO="550e8400-e29b-41d4-a716-446655440000"

  curl -X PUT "https://kyc.sbx.moduluslabs.io/v2/onboard/${REF_NO}" \
    -H "Authorization: Bearer ${BEARER_TOKEN}" \
    -H "Content-Type: application/json" \
    -d '{
      "merchantName": "Acme Store",
      "businessHandle": "acme-store",
      "modeOfPayments": ["CREDIT_CARD", "DEBIT_CARD", "GCASH"],
      "currency": "PHP",
      "tin": "123456789012",
      "industry": "Retail",
      "serviceDescription": "Online retail store selling electronics and gadgets",
      "isBrickAndMortarStore": true,
      "address": {
        "office": {
          "city": "Manila",
          "line1": "123 Main Street",
          "buildingNameAndNumber": "Building A",
          "state": "Metro Manila",
          "postalCode": "1000",
          "contactNumber": "639171234567",
          "barangay": "Barangay 1"
        }
      },
      "representatives": {
        "authorized": {
          "firstName": "Juan",
          "lastName": "Dela Cruz",
          "emailAddress": "juan@acme.com",
          "contactNumber": "639171234567",
          "dateOfBirth": "1985-05-15",
          "position": "CEO"
        }
      },
      "banks": [
        {
          "accountDepositType": "BANK",
          "accountType": "SAVINGS",
          "bankName": "BDO",
          "accountName": "Acme Corporation",
          "accountNumber": "1234567890",
          "currency": "PHP",
          "preferredSettlementRail": "instapay"
        }
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const BEARER_TOKEN = process.env.BEARER_TOKEN;
  const REF_NO = '550e8400-e29b-41d4-a716-446655440000';

  const updateData = {
    merchantName: 'Acme Store',
    businessHandle: 'acme-store',
    modeOfPayments: ['CREDIT_CARD', 'DEBIT_CARD', 'GCASH'],
    currency: 'PHP',
    tin: '123456789012',
    industry: 'Retail',
    serviceDescription: 'Online retail store selling electronics and gadgets',
    isBrickAndMortarStore: true,
    address: {
      office: {
        city: 'Manila',
        line1: '123 Main Street',
        buildingNameAndNumber: 'Building A',
        state: 'Metro Manila',
        postalCode: '1000',
        contactNumber: '639171234567',
        barangay: 'Barangay 1'
      }
    },
    representatives: {
      authorized: {
        firstName: 'Juan',
        lastName: 'Dela Cruz',
        emailAddress: 'juan@acme.com',
        contactNumber: '639171234567',
        dateOfBirth: '1985-05-15',
        position: 'CEO'
      }
    },
    banks: [
      {
        accountDepositType: 'BANK',
        accountType: 'SAVINGS',
        bankName: 'BDO',
        accountName: 'Acme Corporation',
        accountNumber: '1234567890',
        currency: 'PHP',
        preferredSettlementRail: 'instapay'
      }
    ]
  };

  async function updateOnboardingData() {
    try {
      const response = await axios.put(
        `https://kyc.sbx.moduluslabs.io/v2/onboard/${REF_NO}`,
        updateData,
        {
          headers: {
            'Authorization': `Bearer ${BEARER_TOKEN}`,
            'Content-Type': 'application/json'
          }
        }
      );

      console.log(' Update successful!');
      console.log('New Status:', response.data.onboardingStatus);
      console.log('Reference Number:', response.data.onboardingReferenceNumber);
    } catch (error) {
      if (error.response) {
        console.error(' Update failed:', error.response.data.message);
        console.error('Status Code:', error.response.status);
      } else {
        console.error(' Error:', error.message);
      }
    }
  }

  updateOnboardingData();
  ```

  ```python Python theme={null}
  import os
  import requests

  BEARER_TOKEN = os.getenv('BEARER_TOKEN')
  REF_NO = '550e8400-e29b-41d4-a716-446655440000'

  update_data = {
      'merchantName': 'Acme Store',
      'businessHandle': 'acme-store',
      'modeOfPayments': ['CREDIT_CARD', 'DEBIT_CARD', 'GCASH'],
      'currency': 'PHP',
      'tin': '123456789012',
      'industry': 'Retail',
      'serviceDescription': 'Online retail store selling electronics and gadgets',
      'isBrickAndMortarStore': True,
      'address': {
          'office': {
              'city': 'Manila',
              'line1': '123 Main Street',
              'buildingNameAndNumber': 'Building A',
              'state': 'Metro Manila',
              'postalCode': '1000',
              'contactNumber': '639171234567',
              'barangay': 'Barangay 1'
          }
      },
      'representatives': {
          'authorized': {
              'firstName': 'Juan',
              'lastName': 'Dela Cruz',
              'emailAddress': 'juan@acme.com',
              'contactNumber': '639171234567',
              'dateOfBirth': '1985-05-15',
              'position': 'CEO'
          }
      },
      'banks': [
          {
              'accountDepositType': 'BANK',
              'accountType': 'SAVINGS',
              'bankName': 'BDO',
              'accountName': 'Acme Corporation',
              'accountNumber': '1234567890',
              'currency': 'PHP',
              'preferredSettlementRail': 'instapay'
          }
      ]
  }

  def update_onboarding_data():
      try:
          response = requests.put(
              f'https://kyc.sbx.moduluslabs.io/v2/onboard/{REF_NO}',
              json=update_data,
              headers={
                  'Authorization': f'Bearer {BEARER_TOKEN}',
                  'Content-Type': 'application/json'
              }
          )
          response.raise_for_status()

          data = response.json()
          print(' Update successful!')
          print(f"New Status: {data['onboardingStatus']}")
          print(f"Reference Number: {data['onboardingReferenceNumber']}")

      except requests.exceptions.HTTPError as error:
          print(f" Update failed: {error.response.json().get('message', 'Unknown error')}")
          print(f"Status Code: {error.response.status_code}")
      except Exception as error:
          print(f" Error: {str(error)}")

  if __name__ == '__main__':
      update_onboarding_data()
  ```

  ```php PHP theme={null}
  <?php

  $bearerToken = getenv('BEARER_TOKEN');
  $refNo = '550e8400-e29b-41d4-a716-446655440000';

  $updateData = [
      'merchantName' => 'Acme Store',
      'businessHandle' => 'acme-store',
      'modeOfPayments' => ['CREDIT_CARD', 'DEBIT_CARD', 'GCASH'],
      'currency' => 'PHP',
      'tin' => '123456789012',
      'industry' => 'Retail',
      'serviceDescription' => 'Online retail store selling electronics and gadgets',
      'isBrickAndMortarStore' => true,
      'address' => [
          'office' => [
              'city' => 'Manila',
              'line1' => '123 Main Street',
              'buildingNameAndNumber' => 'Building A',
              'state' => 'Metro Manila',
              'postalCode' => '1000',
              'contactNumber' => '639171234567',
              'barangay' => 'Barangay 1'
          ]
      ],
      'representatives' => [
          'authorized' => [
              'firstName' => 'Juan',
              'lastName' => 'Dela Cruz',
              'emailAddress' => 'juan@acme.com',
              'contactNumber' => '639171234567',
              'dateOfBirth' => '1985-05-15',
              'position' => 'CEO'
          ]
      ],
      'banks' => [
          [
              'accountDepositType' => 'BANK',
              'accountType' => 'SAVINGS',
              'bankName' => 'BDO',
              'accountName' => 'Acme Corporation',
              'accountNumber' => '1234567890',
              'currency' => 'PHP',
              'preferredSettlementRail' => 'instapay'
          ]
      ]
  ];

  $ch = curl_init("https://kyc.sbx.moduluslabs.io/v2/onboard/{$refNo}");
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($updateData));
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer ' . $bearerToken,
      'Content-Type: application/json'
  ]);

  $response = curl_exec($ch);
  $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  curl_close($ch);

  $data = json_decode($response, true);

  if ($httpCode === 200) {
      echo " Update successful!\n";
      echo "New Status: {$data['onboardingStatus']}\n";
      echo "Reference Number: {$data['onboardingReferenceNumber']}\n";
  } else {
      echo " Update failed: {$data['message']}\n";
      echo "Status Code: {$httpCode}\n";
  }
  ```

  ```java Java theme={null}
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import org.json.JSONObject;
  import org.json.JSONArray;

  public class UpdateOnboardingData {
      private static final String BEARER_TOKEN = System.getenv("BEARER_TOKEN");
      private static final String REF_NO = "550e8400-e29b-41d4-a716-446655440000";

      public static void main(String[] args) {
          try {
              JSONObject updateData = new JSONObject();
              updateData.put("merchantName", "Acme Store");
              updateData.put("businessHandle", "acme-store");
              updateData.put("modeOfPayments", new JSONArray()
                  .put("CREDIT_CARD")
                  .put("DEBIT_CARD")
                  .put("GCASH"));
              updateData.put("currency", "PHP");
              updateData.put("tin", "123456789012");
              updateData.put("industry", "Retail");
              updateData.put("serviceDescription", "Online retail store selling electronics and gadgets");
              updateData.put("isBrickAndMortarStore", true);

              JSONObject office = new JSONObject()
                  .put("city", "Manila")
                  .put("line1", "123 Main Street")
                  .put("buildingNameAndNumber", "Building A")
                  .put("state", "Metro Manila")
                  .put("postalCode", "1000")
                  .put("contactNumber", "639171234567")
                  .put("barangay", "Barangay 1");
              updateData.put("address", new JSONObject().put("office", office));

              JSONObject authorized = new JSONObject()
                  .put("firstName", "Juan")
                  .put("lastName", "Dela Cruz")
                  .put("emailAddress", "juan@acme.com")
                  .put("contactNumber", "639171234567")
                  .put("dateOfBirth", "1985-05-15")
                  .put("position", "CEO");
              updateData.put("representatives", new JSONObject().put("authorized", authorized));

              JSONObject bank = new JSONObject()
                  .put("accountDepositType", "BANK")
                  .put("accountType", "SAVINGS")
                  .put("bankName", "BDO")
                  .put("accountName", "Acme Corporation")
                  .put("accountNumber", "1234567890")
                  .put("currency", "PHP")
                  .put("preferredSettlementRail", "instapay");
              updateData.put("banks", new JSONArray().put(bank));

              HttpClient client = HttpClient.newHttpClient();
              HttpRequest request = HttpRequest.newBuilder()
                  .uri(URI.create("https://kyc.sbx.moduluslabs.io/v2/onboard/" + REF_NO))
                  .header("Authorization", "Bearer " + BEARER_TOKEN)
                  .header("Content-Type", "application/json")
                  .PUT(HttpRequest.BodyPublishers.ofString(updateData.toString()))
                  .build();

              HttpResponse<String> response = client.send(request,
                  HttpResponse.BodyHandlers.ofString());

              if (response.statusCode() == 200) {
                  JSONObject data = new JSONObject(response.body());
                  System.out.println(" Update successful!");
                  System.out.println("New Status: " + data.getString("onboardingStatus"));
                  System.out.println("Reference Number: " + data.getString("onboardingReferenceNumber"));
              } else {
                  JSONObject error = new JSONObject(response.body());
                  System.err.println(" Update failed: " + error.getString("message"));
                  System.err.println("Status Code: " + response.statusCode());
              }
          } catch (Exception e) {
              System.err.println(" Error: " + e.getMessage());
              e.printStackTrace();
          }
      }
  }
  ```

  ```go Go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "fmt"
      "io"
      "net/http"
      "os"
  )

  type UpdateData struct {
      MerchantName        string                 `json:"merchantName"`
      BusinessHandle      string                 `json:"businessHandle"`
      ModeOfPayments      []string               `json:"modeOfPayments"`
      Currency            string                 `json:"currency"`
      Tin                 string                 `json:"tin"`
      Industry            string                 `json:"industry"`
      ServiceDescription  string                 `json:"serviceDescription"`
      IsBrickAndMortarStore bool                 `json:"isBrickAndMortarStore"`
      Address             Address                `json:"address"`
      Representatives     Representatives        `json:"representatives"`
      Banks               []BankAccount          `json:"banks"`
  }

  type Address struct {
      Office OfficeAddress `json:"office"`
  }

  type OfficeAddress struct {
      City                  string `json:"city"`
      Line1                 string `json:"line1"`
      BuildingNameAndNumber string `json:"buildingNameAndNumber"`
      State                 string `json:"state"`
      PostalCode            string `json:"postalCode"`
      ContactNumber         string `json:"contactNumber"`
      Barangay              string `json:"barangay"`
  }

  type Representatives struct {
      Authorized AuthorizedRep `json:"authorized"`
  }

  type AuthorizedRep struct {
      FirstName     string `json:"firstName"`
      LastName      string `json:"lastName"`
      EmailAddress  string `json:"emailAddress"`
      ContactNumber string `json:"contactNumber"`
      DateOfBirth   string `json:"dateOfBirth"`
      Position      string `json:"position"`
  }

  type BankAccount struct {
      AccountDepositType      string `json:"accountDepositType"`
      AccountType             string `json:"accountType"`
      BankName                string `json:"bankName"`
      AccountName             string `json:"accountName"`
      AccountNumber           string `json:"accountNumber"`
      Currency                string `json:"currency"`
      PreferredSettlementRail string `json:"preferredSettlementRail"`
  }

  type Response struct {
      OnboardingStatus          string `json:"onboardingStatus"`
      OnboardingReferenceNumber string `json:"onboardingReferenceNumber"`
  }

  type ErrorResponse struct {
      StatusCode int    `json:"statusCode"`
      Message    string `json:"message"`
      Error      string `json:"error"`
  }

  func main() {
      bearerToken := os.Getenv("BEARER_TOKEN")
      refNo := "550e8400-e29b-41d4-a716-446655440000"

      updateData := UpdateData{
          MerchantName:   "Acme Store",
          BusinessHandle: "acme-store",
          ModeOfPayments: []string{"CREDIT_CARD", "DEBIT_CARD", "GCASH"},
          Currency:       "PHP",
          Tin:            "123456789012",
          Industry:       "Retail",
          ServiceDescription: "Online retail store selling electronics and gadgets",
          IsBrickAndMortarStore: true,
          Address: Address{
              Office: OfficeAddress{
                  City:                  "Manila",
                  Line1:                 "123 Main Street",
                  BuildingNameAndNumber: "Building A",
                  State:                 "Metro Manila",
                  PostalCode:            "1000",
                  ContactNumber:         "639171234567",
                  Barangay:              "Barangay 1",
              },
          },
          Representatives: Representatives{
              Authorized: AuthorizedRep{
                  FirstName:     "Juan",
                  LastName:      "Dela Cruz",
                  EmailAddress:  "juan@acme.com",
                  ContactNumber: "639171234567",
                  DateOfBirth:   "1985-05-15",
                  Position:      "CEO",
              },
          },
          Banks: []BankAccount{
              {
                  AccountDepositType:      "BANK",
                  AccountType:             "SAVINGS",
                  BankName:                "BDO",
                  AccountName:             "Acme Corporation",
                  AccountNumber:           "1234567890",
                  Currency:                "PHP",
                  PreferredSettlementRail: "instapay",
              },
          },
      }

      jsonData, err := json.Marshal(updateData)
      if err != nil {
          fmt.Printf(" Error marshaling JSON: %v\n", err)
          return
      }

      url := fmt.Sprintf("https://kyc.sbx.moduluslabs.io/v2/onboard/%s", refNo)
      req, err := http.NewRequest("PUT", url, bytes.NewBuffer(jsonData))
      if err != nil {
          fmt.Printf(" Error creating request: %v\n", err)
          return
      }

      req.Header.Set("Authorization", "Bearer "+bearerToken)
      req.Header.Set("Content-Type", "application/json")

      client := &http.Client{}
      resp, err := client.Do(req)
      if err != nil {
          fmt.Printf(" Error making request: %v\n", err)
          return
      }
      defer resp.Body.Close()

      body, err := io.ReadAll(resp.Body)
      if err != nil {
          fmt.Printf(" Error reading response: %v\n", err)
          return
      }

      if resp.StatusCode == 200 {
          var response Response
          if err := json.Unmarshal(body, &response); err != nil {
              fmt.Printf(" Error parsing response: %v\n", err)
              return
          }
          fmt.Println(" Update successful!")
          fmt.Printf("New Status: %s\n", response.OnboardingStatus)
          fmt.Printf("Reference Number: %s\n", response.OnboardingReferenceNumber)
      } else {
          var errorResponse ErrorResponse
          if err := json.Unmarshal(body, &errorResponse); err != nil {
              fmt.Printf(" Error parsing error response: %v\n", err)
              return
          }
          fmt.Printf(" Update failed: %s\n", errorResponse.Message)
          fmt.Printf("Status Code: %d\n", resp.StatusCode)
      }
  }
  ```

  ```csharp C#/.NET theme={null}
  using System;
  using System.Net.Http;
  using System.Text;
  using System.Text.Json;
  using System.Threading.Tasks;

  class Program
  {
      private static readonly string BEARER_TOKEN = Environment.GetEnvironmentVariable("BEARER_TOKEN");
      private static readonly string REF_NO = "550e8400-e29b-41d4-a716-446655440000";

      static async Task Main(string[] args)
      {
          var updateData = new
          {
              merchantName = "Acme Store",
              businessHandle = "acme-store",
              modeOfPayments = new[] { "CREDIT_CARD", "DEBIT_CARD", "GCASH" },
              currency = "PHP",
              tin = "123456789012",
              industry = "Retail",
              serviceDescription = "Online retail store selling electronics and gadgets",
              isBrickAndMortarStore = true,
              address = new
              {
                  office = new
                  {
                      city = "Manila",
                      line1 = "123 Main Street",
                      buildingNameAndNumber = "Building A",
                      state = "Metro Manila",
                      postalCode = "1000",
                      contactNumber = "639171234567",
                      barangay = "Barangay 1"
                  }
              },
              representatives = new
              {
                  authorized = new
                  {
                      firstName = "Juan",
                      lastName = "Dela Cruz",
                      emailAddress = "juan@acme.com",
                      contactNumber = "639171234567",
                      dateOfBirth = "1985-05-15",
                      position = "CEO"
                  }
              },
              banks = new[]
              {
                  new
                  {
                      accountDepositType = "BANK",
                      accountType = "SAVINGS",
                      bankName = "BDO",
                      accountName = "Acme Corporation",
                      accountNumber = "1234567890",
                      currency = "PHP",
                      preferredSettlementRail = "instapay"
                  }
              }
          };

          using var client = new HttpClient();
          client.DefaultRequestHeaders.Add("Authorization", $"Bearer {BEARER_TOKEN}");

          var json = JsonSerializer.Serialize(updateData);
          var content = new StringContent(json, Encoding.UTF8, "application/json");

          try
          {
              var response = await client.PutAsync(
                  $"https://kyc.sbx.moduluslabs.io/v2/onboard/{REF_NO}",
                  content
              );

              var responseBody = await response.Content.ReadAsStringAsync();

              if (response.IsSuccessStatusCode)
              {
                  using var doc = JsonDocument.Parse(responseBody);
                  var root = doc.RootElement;

                  Console.WriteLine(" Update successful!");
                  Console.WriteLine($"New Status: {root.GetProperty("onboardingStatus").GetString()}");
                  Console.WriteLine($"Reference Number: {root.GetProperty("onboardingReferenceNumber").GetString()}");
              }
              else
              {
                  using var doc = JsonDocument.Parse(responseBody);
                  var root = doc.RootElement;

                  Console.WriteLine($" Update failed: {root.GetProperty("message").GetString()}");
                  Console.WriteLine($"Status Code: {(int)response.StatusCode}");
              }
          }
          catch (Exception ex)
          {
              Console.WriteLine($" Error: {ex.Message}");
          }
      }
  }
  ```
</RequestExample>

## Response

### Success Response

**Status Code:** `200 OK`

<ResponseField name="onboardingStatus" type="string" required>
  The new status after update

  **Value:** `PENDING` (for regular users)

  Regular users: Status changes from DECLINED → PENDING
  Super Admins: Status remains APPROVED
</ResponseField>

<ResponseField name="onboardingReferenceNumber" type="string" required>
  The onboarding reference number (unchanged)

  **Format:** UUID v4

  **Example:** `"550e8400-e29b-41d4-a716-446655440000"`
</ResponseField>

```json theme={null}
{
  "onboardingStatus": "PENDING",
  "onboardingReferenceNumber": "550e8400-e29b-41d4-a716-446655440000"
}
```

### Error Responses

<AccordionGroup>
  <Accordion title="400 Bad Request - Not Declined (Regular User)">
    **Status Code:** `400`

    ```json theme={null}
    {
      "statusCode": 400,
      "message": "Unable to update. Merchant is not in declined status.",
      "error": "Bad Request"
    }
    ```

    **Cause:** Regular user attempting to update a merchant that is not in DECLINED status

    **Solution:** Only merchants in DECLINED status can be updated by regular users
  </Accordion>

  <Accordion title="400 Bad Request - Not Approved (Super Admin)">
    **Status Code:** `400`

    ```json theme={null}
    {
      "statusCode": 400,
      "message": "Unable to update. Merchant is not in approved status.",
      "error": "Bad Request"
    }
    ```

    **Cause:** Super Admin attempting to update a merchant that is not in APPROVED status

    **Solution:** Super Admins can only update merchants in APPROVED status
  </Accordion>

  <Accordion title="400 Bad Request - Validation Error">
    **Status Code:** `400`

    ```json theme={null}
    {
      "statusCode": 400,
      "message": "merchantName is required.",
      "error": "Bad Request"
    }
    ```

    **Cause:** Request body validation failed

    **Solution:** Ensure all required fields are provided and meet validation rules
  </Accordion>

  <Accordion title="400 Bad Request - Business Handle Taken">
    **Status Code:** `400`

    ```json theme={null}
    {
      "statusCode": 400,
      "message": "Business handle is not available",
      "error": "Bad Request"
    }
    ```

    **Cause:** The requested business handle is already taken by another merchant

    **Solution:** Choose a different business handle
  </Accordion>

  <Accordion title="400 Bad Request - Invalid Reference Number">
    **Status Code:** `400`

    ```json theme={null}
    {
      "statusCode": 400,
      "message": "Invalid onboarding reference number format",
      "error": "Bad Request",
      "details": {
        "refNumReceived": "invalid-uuid"
      }
    }
    ```

    **Cause:** The reference number is not a valid UUID v4 format

    **Solution:** Ensure the reference number is a valid UUID v4
  </Accordion>

  <Accordion title="400 Bad Request - Record Does Not Exist">
    **Status Code:** `400`

    ```json theme={null}
    {
      "statusCode": 400,
      "message": "Onboarding record does not exist",
      "error": "Bad Request"
    }
    ```

    **Cause:** No onboarding record found for the authenticated user

    **Solution:** Verify the reference number and that the onboarding record exists
  </Accordion>

  <Accordion title="400 Bad Request - Reference Number Mismatch">
    **Status Code:** `400`

    ```json theme={null}
    {
      "statusCode": 400,
      "message": "Onboarding reference number mismatch",
      "error": "Bad Request",
      "details": {
        "refNumReceived": "550e8400-e29b-41d4-a716-446655440000"
      }
    }
    ```

    **Cause:** The reference number doesn't match the authenticated user's record

    **Solution:** Use the correct JWT token for the account that owns this record
  </Accordion>

  <Accordion title="400 Bad Request - Update Failed">
    **Status Code:** `400`

    ```json theme={null}
    {
      "statusCode": 400,
      "message": "Failed to update onboarding record",
      "error": "Bad Request"
    }
    ```

    **Cause:** Database transaction failed during update

    **Solution:** Retry the request. If issue persists, contact support
  </Accordion>

  <Accordion title="401 Unauthorized">
    **Status Code:** `401`

    ```json theme={null}
    {
      "statusCode": 401,
      "message": "Account not found",
      "error": "Unauthorized"
    }
    ```

    **Cause:** Invalid or missing JWT Bearer token

    **Solution:** Ensure valid authentication token is provided
  </Accordion>
</AccordionGroup>

## Transaction Behavior

<Warning>
  **Atomic Transaction:** All updates are performed within a database transaction. If any part fails, the entire update is rolled back and no changes are made.
</Warning>

The update process includes:

1. Validating all request parameters
2. Checking user authorization and merchant status
3. Updating business information
4. Updating incorporators and signatories
5. Updating addresses and representatives
6. Updating bank accounts
7. Changing status to PENDING (for regular users)

If any step fails, **no changes** are persisted.

## Validation Rules Summary

<CardGroup cols={2}>
  <Card title="Business Type" icon="building">
    Non-STARTER businesses require `legalName` and `businessHandle`
  </Card>

  <Card title="Bank Accounts" icon="building-columns">
    When not `NO_ACCOUNT`: `bankName`, `accountName`, `accountNumber`, `currency` required
  </Card>

  <Card title="Bank Type" icon="landmark">
    When `accountDepositType` is `BANK`: `accountType` is also required
  </Card>

  <Card title="Website" icon="globe">
    If `businessWebsiteUrl` provided: `isBusinessWebsiteUnderDevelopment` required
  </Card>
</CardGroup>

## Status Change Flow

<Steps>
  <Step title="Merchant is DECLINED">
    Admin has declined the merchant's onboarding application with a reason
  </Step>

  <Step title="Merchant Updates Data">
    Merchant corrects the issues and submits update via this endpoint
  </Step>

  <Step title="Status Changes to PENDING">
    Upon successful update, status automatically changes to PENDING
  </Step>

  <Step title="Admin Re-reviews">
    Admin reviews the updated information and either approves or declines again
  </Step>
</Steps>

## Best Practices

<AccordionGroup>
  <Accordion title="Retrieve Current Data First" icon="download">
    Before updating, fetch the current onboarding data to pre-fill your form:

    ```javascript theme={null}
    // 1. Get current data
    const currentData = await retrieveOnboardingData(refNo);

    // 2. Let user edit the data
    const updatedData = await showEditForm(currentData);

    // 3. Submit the update
    const result = await updateOnboardingData(refNo, updatedData);
    ```
  </Accordion>

  <Accordion title="Check Declined Reason" icon="clipboard-list">
    Review the decline reason to know what to fix:

    ```javascript theme={null}
    const status = await getOnboardingStatus(refNo);

    if (status.onboardingStatus === 'DECLINED') {
      console.log('Reason:', status.declinedReason);
      // Show decline reason to user
      // Highlight fields that need correction
    }
    ```
  </Accordion>

  <Accordion title="Validate Before Submitting" icon="shield-check">
    Validate all required fields client-side to catch errors early:

    ```javascript theme={null}
    function validateOnboardingData(data) {
      const errors = [];

      if (!data.merchantName) {
        errors.push('Merchant name is required');
      }

      if (!data.tin || !/^\d+$/.test(data.tin)) {
        errors.push('TIN must contain only numbers');
      }

      if (data.banks.length === 0) {
        errors.push('At least one bank account is required');
      }

      return errors;
    }
    ```
  </Accordion>

  <Accordion title="Handle Business Handle Conflicts" icon="triangle-exclamation">
    Check if business handle is available before submitting:

    ```javascript theme={null}
    async function updateWithRetry(refNo, data) {
      try {
        return await updateOnboardingData(refNo, data);
      } catch (error) {
        if (error.message.includes('Business handle is not available')) {
          // Suggest alternative handles
          data.businessHandle = `${data.businessHandle}-${Date.now()}`;
          return await updateOnboardingData(refNo, data);
        }
        throw error;
      }
    }
    ```
  </Accordion>

  <Accordion title="Preserve Optional Fields" icon="database">
    Include optional fields from original submission to avoid losing data:

    ```javascript theme={null}
    // Don't just update changed fields
    const updateData = {
      ...currentData, // Start with all current data
      ...changedFields, // Override with changes
      // This preserves optional fields like websites, signatories, etc.
    };
    ```
  </Accordion>
</AccordionGroup>

## Use Cases

<CardGroup cols={2}>
  <Card title="Fix Declined Application" icon="pen-to-square">
    Correct issues identified in decline reason and resubmit
  </Card>

  <Card title="Update Business Info" icon="building">
    Update business details after changes (Super Admin only for approved)
  </Card>

  <Card title="Add Missing Documents" icon="file-circle-plus">
    Add information that was missing in original submission
  </Card>

  <Card title="Correct Validation Errors" icon="circle-exclamation">
    Fix validation issues from initial onboarding
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Cannot Update APPROVED Merchant" icon="lock">
    **Error:** `Unable to update. Merchant is not in declined status.`

    **Issue:** Regular users cannot update approved merchants

    **Solution:**

    * Only DECLINED merchants can be updated by regular users
    * If you need to update an APPROVED merchant, contact a Super Admin
    * To update business details after approval, create a new onboarding request
  </Accordion>

  <Accordion title="Transaction Keeps Rolling Back" icon="rotate-left">
    **Issue:** Update fails with `Failed to update onboarding record`

    **Possible Causes:**

    * Database connectivity issues
    * Data integrity constraints violated
    * Concurrent updates from multiple sources

    **Solution:**

    * Retry the request after a short delay
    * Ensure no concurrent updates are happening
    * Contact support if issue persists
  </Accordion>

  <Accordion title="Validation Errors on Update" icon="circle-xmark">
    **Issue:** Getting validation errors like `merchantName is required`

    **Solution:**

    * Ensure ALL required fields from original onboarding are included
    * Don't just send changed fields - send complete data
    * Use retrieve endpoint to get current data first
    * Validate against the same rules as initial onboarding
  </Accordion>
</AccordionGroup>

## Field Validation Reference

<Tabs>
  <Tab title="Text Fields">
    * **First/Middle/Last Names**: 1-100 chars, Unicode letters, spaces, hyphens, apostrophes
    * **Email**: Valid email format, max 100 chars
    * **TIN**: Numbers only, max 20 chars
    * **Postal Code**: 4-10 digits, numbers only
    * **Contact Number**: Numbers only, max 30 chars
    * **SSS**: Exactly 10 digits
  </Tab>

  <Tab title="Enums">
    * **accountDepositType**: BANK, PAYMAYA, GCASH, NO\_ACCOUNT
    * **accountType**: SAVINGS, CHECKING\_CURRENT
    * **currency**: PHP, USD
    * **gender**: MALE, FEMALE
    * **settlementRail**: instapay, pesonet
  </Tab>

  <Tab title="Patterns">
    * **businessHandle**: `^([A-Za-z]|[0-9]|_|-)+$`
    * **bankCode**: `^[A-Z0-9]{8,11}$`
    * **tin**: `^\d+$`
    * **postalCode**: `^\d+$`
    * **contactNumber**: `^\d+$`
  </Tab>

  <Tab title="Arrays">
    * **modeOfPayments**: Min 1 item
    * **banks**: Min 1, Max 2 items
    * **incorporators**: Min 1, Max 5 items (non-STARTER only)
    * **signatories**: Min 1, Max 5 items
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="Retrieve Onboarding Data" icon="download" href="/api-reference/onboarding/retrieve-onboarding-data">
    Get current onboarding data before updating
  </Card>

  <Card title="Retrieve Status" icon="clipboard-check" href="/api-reference/onboarding/retrieve-onboarding-status">
    Check if merchant is in DECLINED status
  </Card>

  <Card title="Onboard Merchant" icon="plus" href="/api-reference/onboarding/onboard-merchant">
    View original onboarding endpoint documentation
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/docs/errors">
    Complete error code reference
  </Card>
</CardGroup>


## OpenAPI

````yaml PUT /v2/onboard/{refNo}
openapi: 3.1.0
info:
  title: Modulus Labs Onboarding API
  description: API for merchant onboarding, KYC verification, and account management
  version: 2.0.0
servers:
  - url: https://kyc.sbx.moduluslabs.io
    description: Sandbox
security: []
paths:
  /v2/onboard/{refNo}:
    put:
      tags:
        - Onboarding
      summary: Update Onboarding Data
      description: >-
        Update merchant onboarding data after being declined. Regular users can
        only update merchants in DECLINED status.
      operationId: updateOnboardingData
      parameters:
        - $ref: '#/components/parameters/RefNoParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnboardMerchantRequest'
      responses:
        '200':
          description: Onboarding data updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateOnboardingResponse'
        '400':
          description: Bad Request - Merchant not in DECLINED status or validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    RefNoParam:
      name: refNo
      in: path
      required: true
      description: The onboarding reference number (UUID v4 format)
      schema:
        type: string
        format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    OnboardMerchantRequest:
      type: object
      required:
        - merchantName
        - modeOfPayments
        - currency
        - tin
        - industry
        - serviceDescription
        - isBrickAndMortarStore
        - address
        - representatives
        - banks
      properties:
        legalName:
          type: string
          maxLength: 500
          description: >-
            Legal registered name of the business (required for non-STARTER
            types)
        merchantName:
          type: string
          maxLength: 500
          description: Trading name or DBA (Doing Business As) name
        businessHandle:
          type: string
          pattern: ^([A-Za-z]|[0-9]|_|-)+$
          description: >-
            Unique business handle/slug for payment links (required for
            non-STARTER types)
        modeOfPayments:
          type: array
          minItems: 1
          items:
            type: string
            enum:
              - CREDIT_CARD
              - DEBIT_CARD
              - GCASH
              - GRABPAY
              - PAYMAYA
              - BANK_TRANSFER
          description: List of accepted payment modes
        currency:
          type: string
          enum:
            - PHP
            - USD
          description: Primary currency for transactions
        tin:
          type: string
          pattern: ^\d+$
          maxLength: 20
          description: Tax Identification Number
        industry:
          type: string
          maxLength: 200
          description: Business industry category
        serviceDescription:
          type: string
          description: Description of services or products offered
        isBrickAndMortarStore:
          type: boolean
          description: Whether the business has a physical store location
        address:
          $ref: '#/components/schemas/BusinessAddress'
        representatives:
          $ref: '#/components/schemas/Representatives'
        banks:
          type: array
          minItems: 1
          maxItems: 2
          items:
            $ref: '#/components/schemas/BankAccount'
          description: List of bank accounts for settlement
        incorporators:
          type: array
          minItems: 1
          maxItems: 5
          items:
            $ref: '#/components/schemas/Incorporator'
          description: List of business incorporators (for non-STARTER types)
        signatories:
          type: array
          minItems: 1
          maxItems: 5
          items:
            $ref: '#/components/schemas/Signatory'
          description: List of authorized signatories
        websites:
          $ref: '#/components/schemas/Websites'
    UpdateOnboardingResponse:
      type: object
      properties:
        onboardingStatus:
          type: string
          enum:
            - PENDING
            - APPROVED
          description: >-
            New status after update (PENDING for regular users, APPROVED
            unchanged for Super Admins)
        onboardingReferenceNumber:
          type: string
          format: uuid
          description: The onboarding reference number (unchanged)
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Error message
        error:
          type: string
          description: Error type
        details:
          type: object
          description: Additional error details
    BusinessAddress:
      type: object
      required:
        - office
      properties:
        office:
          $ref: '#/components/schemas/Address'
        registered:
          $ref: '#/components/schemas/Address'
    Representatives:
      type: object
      required:
        - authorized
      properties:
        authorized:
          $ref: '#/components/schemas/AuthorizedRepresentative'
        escalation:
          $ref: '#/components/schemas/EscalationRepresentative'
    BankAccount:
      type: object
      required:
        - accountDepositType
        - currency
      properties:
        accountDepositType:
          type: string
          enum:
            - BANK
            - PAYMAYA
            - GCASH
            - NO_ACCOUNT
          description: Type of deposit account
        accountType:
          type: string
          enum:
            - SAVINGS
            - CHECKING_CURRENT
          description: Type of bank account (required when accountDepositType is BANK)
        bankName:
          type: string
          maxLength: 500
          description: >-
            Name of the bank (required when accountDepositType is not
            NO_ACCOUNT)
        accountName:
          type: string
          maxLength: 500
          description: Name on the bank account
        accountNumber:
          type: string
          maxLength: 500
          description: Bank account number (will be encrypted)
        currency:
          type: string
          enum:
            - PHP
            - USD
          description: Currency of the bank account
        preferredSettlementRail:
          type: string
          enum:
            - instapay
            - pesonet
          description: Preferred settlement rail for fund transfers
        bankCode:
          type: string
          pattern: ^[A-Z0-9]{8,11}$
          description: SWIFT/BIC code
    Incorporator:
      type: object
      required:
        - firstName
        - lastName
        - emailAddress
        - contactNumber
        - dateOfBirth
        - address
      properties:
        firstName:
          type: string
          maxLength: 100
        middleName:
          type: string
          maxLength: 100
        lastName:
          type: string
          maxLength: 100
        emailAddress:
          type: string
          format: email
          maxLength: 100
        contactNumber:
          type: string
          pattern: ^\d+$
          maxLength: 30
        dateOfBirth:
          type: string
          format: date
        address:
          $ref: '#/components/schemas/Address'
    Signatory:
      type: object
      required:
        - firstName
        - lastName
        - position
      properties:
        firstName:
          type: string
          maxLength: 100
        middleName:
          type: string
          maxLength: 100
        lastName:
          type: string
          maxLength: 100
        position:
          type: string
          maxLength: 100
          description: Position/title
    Websites:
      type: object
      properties:
        businessWebsiteUrl:
          type: string
          format: uri
          description: Main business website URL
        isBusinessWebsiteUnderDevelopment:
          type: boolean
          description: >-
            Whether the website is still under development (required if
            businessWebsiteUrl provided)
        facebookUrl:
          type: string
          format: uri
        twitterUrl:
          type: string
          format: uri
        instagramUrl:
          type: string
          format: uri
        tiktokUrl:
          type: string
          format: uri
    Address:
      type: object
      required:
        - city
        - line1
        - state
        - postalCode
        - contactNumber
        - barangay
      properties:
        city:
          type: string
          maxLength: 100
          description: City
        line1:
          type: string
          maxLength: 64
          description: Street address
        buildingNameAndNumber:
          type: string
          maxLength: 200
          description: Building name and number
        state:
          type: string
          maxLength: 64
          description: Province/State
        postalCode:
          type: string
          pattern: ^\d{4,10}$
          description: Postal code (4-10 digits)
        contactNumber:
          type: string
          pattern: ^\d+$
          maxLength: 30
          description: Contact number (digits only)
        barangay:
          type: string
          maxLength: 200
          description: Barangay
    AuthorizedRepresentative:
      type: object
      required:
        - firstName
        - lastName
        - emailAddress
        - contactNumber
        - dateOfBirth
        - position
      properties:
        firstName:
          type: string
          maxLength: 100
        middleName:
          type: string
          maxLength: 100
        lastName:
          type: string
          maxLength: 100
        emailAddress:
          type: string
          format: email
          maxLength: 100
        contactNumber:
          type: string
          pattern: ^\d+$
          maxLength: 30
        dateOfBirth:
          type: string
          format: date
          description: Date of birth (ISO 8601 date format)
        position:
          type: string
          maxLength: 100
          description: Job position/title
        tin:
          type: string
          pattern: ^\d+$
          maxLength: 20
        sss:
          type: string
          pattern: ^\d{10}$
          description: SSS number (exactly 10 digits)
        mothersMaidenName:
          type: string
          maxLength: 255
        gender:
          type: string
          enum:
            - MALE
            - FEMALE
    EscalationRepresentative:
      type: object
      properties:
        firstName:
          type: string
          maxLength: 100
        lastName:
          type: string
          maxLength: 100
        emailAddress:
          type: string
          format: email
        contactNumber:
          type: string
          pattern: ^\d+$
        dateOfBirth:
          type: string
          format: date
        tin:
          type: string
          pattern: ^\d{9}$
        sss:
          type: string
          pattern: ^\d{10}$
        position:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Bearer token authentication

````