Skip to content

Quickstart

This walks through a complete Business Name order with curl. Prefer clicking? Use the Postman collection instead.

1. Get your API key

Log in at partners.diylaw.ng/login, open Settings, enter your password and click Generate Key. Copy the key. It is shown only once. Step-by-step with screenshots.

Keep it in an environment variable on your server:

export DIYLAW_API_KEY='dlp_XXXXXXXX.your-secret'

2. Check the key works

GEThttps://partners.diylaw.ng/api/account/v1/Me
curl -X GET "https://partners.diylaw.ng/api/account/v1/Me" \
  -H "Authorization: Bearer $DIYLAW_API_KEY"
{
  "organization": "Acme Payments",
  "email": "[email protected]",
  "key": "dlp_7KQ2MX4R.••••••••"
}

A 401 means the key is wrong, revoked, or API access isn't enabled for your account. See Errors.

3. Look up the IDs you need

Country and nationality fields take IDs, not names. Fetch them once and cache them:

curl https://partners.diylaw.ng/api/options/v1/Countries -H "Authorization: Bearer $DIYLAW_API_KEY"
curl https://partners.diylaw.ng/api/options/v1/Nationalities -H "Authorization: Bearer $DIYLAW_API_KEY"

Each returns a list of {"display": "Nigeria", "value": 165}. Send the value. The IDs in these docs are examples, so always use the ones the API returns to you.

4. Upload the proprietor's ID

POSThttps://partners.diylaw.ng/api/options/v1/FileUpload
multipart/form-data with one field:
file = the document (PDF, PNG or JPEG, up to 5 MB)
curl -X POST "https://partners.diylaw.ng/api/options/v1/FileUpload" \
  -H "Authorization: Bearer $DIYLAW_API_KEY" \
  -F "[email protected]"
{
  "file": "api_uploads/1/Xb7Qm2Kp9Lr4Tz8Vn1Wc1.pdf"
}

Keep the file value. It goes into the identity field in step 6.

5. Create the order (step 1)

POSThttps://partners.diylaw.ng/api/order/v1/BusinessName/step1
{
  "business_name1": "Ngozi Lens Studio",
  "business_name2": "Ngozi Visuals",
  "business_nature": "Others",
  "other_business_nature": "Drone and event photography",
  "address": "5 Herbert Macaulay Way",
  "country": 165,
  "state": "Lagos",
  "city": "Yaba"
}
curl -X POST "https://partners.diylaw.ng/api/order/v1/BusinessName/step1" \
  -H "Authorization: Bearer $DIYLAW_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "business_name1": "Ngozi Lens Studio",
  "business_name2": "Ngozi Visuals",
  "business_nature": "Others",
  "other_business_nature": "Drone and event photography",
  "address": "5 Herbert Macaulay Way",
  "country": 165,
  "state": "Lagos",
  "city": "Yaba"
}
JSON
{
  "orderReference": "b8n4t6w2pe",
  "data": {
    "business_name1": "Ngozi Lens Studio",
    "business_name2": "Ngozi Visuals",
    "business_name3": null,
    "business_name4": null,
    "business_nature": "Others",
    "other_business_nature": "Drone and event photography",
    "address": "5 Herbert Macaulay Way",
    "country": 165,
    "state": "Lagos",
    "city": "Yaba"
  }
}

Save orderReference. Every later step needs it.

6. Add the proprietor (step 2)

Use the reference from step 5 as order-ref, and the file reference from step 4 as identity.

POSThttps://partners.diylaw.ng/api/order/v1/BusinessName/step2?order-ref={orderReference}
{
  "firstname": "Ngozi",
  "lastname": "Okafor",
  "gender": "Female",
  "dob": "1992-07-04",
  "nationality": 124,
  "occupation": "Photographer",
  "identity_type": "National ID Card",
  "identity_number": "23456789012",
  "identity": "api_uploads/1/Xb7Qm2Kp9Lr4Tz8Vn1Wc3.pdf",
  "proprietor_address": "6 Ojuelegba Road",
  "proprietor_country": 165,
  "proprietor_state": "Lagos",
  "proprietor_city": "Surulere",
  "proprietor_email": "[email protected]",
  "proprietor_phone": "08033334444"
}
curl -X POST "https://partners.diylaw.ng/api/order/v1/BusinessName/step2?order-ref=b8n4t6w2pe" \
  -H "Authorization: Bearer $DIYLAW_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "firstname": "Ngozi",
  "lastname": "Okafor",
  "gender": "Female",
  "dob": "1992-07-04",
  "nationality": 124,
  "occupation": "Photographer",
  "identity_type": "National ID Card",
  "identity_number": "23456789012",
  "identity": "api_uploads/1/Xb7Qm2Kp9Lr4Tz8Vn1Wc3.pdf",
  "proprietor_address": "6 Ojuelegba Road",
  "proprietor_country": 165,
  "proprietor_state": "Lagos",
  "proprietor_city": "Surulere",
  "proprietor_email": "[email protected]",
  "proprietor_phone": "08033334444"
}
JSON
{
  "orderReference": "b8n4t6w2pe",
  "data": {
    "id": 1,
    "firstname": "Ngozi",
    "middlename": null,
    "lastname": "Okafor",
    "former_name": null,
    "gender": "Female",
    "dob": "1992-07-04",
    "nationality": 124,
    "former_nationality": null,
    "occupation": "Photographer",
    "identity_type": "National ID Card",
    "identity_number": "23456789012",
    "identity": "api_uploads/1/Xb7Qm2Kp9Lr4Tz8Vn1Wc3.pdf",
    "signature": null,
    "passport": null,
    "proprietor_address": "6 Ojuelegba Road",
    "proprietor_country": 165,
    "proprietor_state": "Lagos",
    "proprietor_city": "Surulere",
    "proprietor_email": "[email protected]",
    "proprietor_phone": "08033334444"
  }
}

7. Finish (step 3)

If no company is a proprietor, send No:

POSThttps://partners.diylaw.ng/api/order/v1/BusinessName/step3?order-ref={orderReference}
{
  "proprietor_company": "No"
}
curl -X POST "https://partners.diylaw.ng/api/order/v1/BusinessName/step3?order-ref=b8n4t6w2pe" \
  -H "Authorization: Bearer $DIYLAW_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "proprietor_company": "No"
}
JSON
{
  "orderReference": "b8n4t6w2pe",
  "data": {
    "proprietor_company": "No",
    "company_name": null,
    "company_address": null,
    "company_country": null,
    "company_state": null,
    "company_city": null,
    "rc_number": null,
    "cac_certificate": null,
    "representative_name": null,
    "representative_designation": null,
    "representative_address": null,
    "representative_country": null,
    "representative_state": null,
    "representative_city": null,
    "representative_phone": null,
    "representative_email": null,
    "representative_type": null,
    "representative_number": null,
    "representative_identity": null
  }
}

That's it. The order is now on your dashboard.

Next