Skip to content

Requests and responses

These rules apply to every endpoint.

URLs

  • Base URL: https://partners.diylaw.ng. HTTPS only.
  • The version is in the path: /api/order/v1/….
  • Paths are case-sensitive and have no trailing slash: /api/options/v1/Countries, not /api/options/v1/countries/.

Request bodies

Send JSON with Content-Type: application/json. The only exception is file uploads, which are multipart/form-data.

Kind of field Send Example
Country, nationality The numeric ID from Countries or Nationalities "country": 165
State The state's name from States "state": "Lagos"
City Free text "city": "Ikeja"
Choices (gender, identity type…) The value from the matching Options endpoint, exactly as returned "identity_type": "Driver's Licence"
Dates YYYY-MM-DD "dob": "1990-01-31"
Documents The reference returned by FileUpload "identity": "api_uploads/…pdf"
Yes/no questions "Yes" or "No" "company_secretary": "No"
is_shareholder_director JSON boolean true

Optional fields can be left out or sent as null. Unknown fields are ignored.

Orders and steps

  1. Step 1 creates the order and returns 201 Created with a new orderReference.
  2. Every later step takes that reference in the query string: ?order-ref=k3v9q2m7xa.
  3. Steps that add people (shareholders, directors, proprietors) add one person per call. Call them once per person. GET on the same URL lists everyone added so far.
  4. Other steps (Business Name step 3, Company Incorporation step 4) save details on the order. Calling them again updates the order with the fields you send.
  5. Every step can be read back with GET and the same order-ref.

Call the steps in order. ProductSteps lists them for each product.

You can only see and change your own orders. Another partner's reference returns 404, the same as one that doesn't exist.

Responses

Order endpoints always return the same shape:

{
  "orderReference": "k3v9q2m7xa",
  "data": { "...": "the saved step" }
}

data echoes what was saved, in the same format you send: IDs for countries, file references for documents. Steps that add people return the new person with its id. Their GET returns a list.

Product and option endpoints return plain JSON lists or objects, shown on each page.

Status When
200 OK Read or update succeeded.
201 Created An order, person or file was created.
4xx Your request needs fixing. See Errors.

Rate limits

Each API key can make 300 requests per minute. Requests without a valid key are limited to 30 per minute per IP address. Over the limit you get 429 Too Many Requests with a Retry-After header. See Errors.

Option lists change rarely. Cache them for a day instead of fetching them before every order.

Retries

Creating calls (POST step 1, people steps, uploads) are not idempotent: sending the same request twice creates two orders or two people. If a create times out, check with a GET (or the dashboard) before retrying, rather than retrying blindly. GET requests are always safe to retry.