API
Everything the forms on this site do, a program can do. Requests and answers are JSON. The same description is at /openapi.json.
Open a job
curl https://11.broker/api/jobs \
-H "content-type: application/json" \
-d '{"what": "Two pallets of tile, Los Angeles to Denver",
"role": "seller",
"name": "Dana Reyes",
"email": "dana@example.com"}'
The answer carries the job number, the key and the address of the job's page:
{
"job": "11-K7P4QX",
"key": "the 22 characters that open it",
"lines": ["shipping"],
"page": "https://11.broker/job/11-K7P4QX?k=..."
}
The key is shown this once. Only a fingerprint of it is kept, so store it with the job number. It opens the job's page for the person you opened it for, and it is the bearer token for every other request about that job.
| Field | Type | Meaning |
|---|---|---|
| what | string, required | What needs brokering, in a sentence or more (11 to 2,000 characters). |
| name | string, required | Who the desk should answer. |
| string, required | Where the desk should answer. | |
| lines | array of strings | Any of real-estate, insurance, animals, shipping, business, mortgages, vehicles, boats, produce, other. Left out, the description is read for them. |
| role | string | One of buyer, seller, both, unsure. |
| where | string | Where it is, or from where to where. |
| when | string | When it needs to happen. |
| amount | string | A price or a budget. |
| otherSide | string | Who is on the other side, if known. |
| phone | string | A phone number for the desk. |
Follow it
curl https://11.broker/api/jobs/11-K7P4QX \
-H "authorization: Bearer YOUR-KEY"
The stage, the checklist, the terms with their fingerprint and signatures, and the notes you may read.
Every route
| Route | Does | Key |
|---|---|---|
| GET /api/lines | The lines: what each takes and leaves, its steps and rules, and whether it is open. | None |
| GET /api/credentials | The credentials register: every license, its issuer and where it stands. | None |
| POST /api/jobs | Open a job. Answers with the job number and a key. The key is shown this once. | None |
| GET /api/jobs/{id} | The job as you may see it: stage, checklist, terms, signatures and the notes you may read. | The job's key |
| POST /api/jobs/{id}/notes | Write to the desk. Send {"note": "..."}. The other side does not see it. | The job's key |
| POST /api/jobs/{id}/sign | Sign the current terms. Send {"version", "fingerprint", "name", "agree": true}, and "bothSides": true when the broker acts for both sides. | The job's key |
| POST /api/jobs/{id}/withdraw | Withdraw a job you opened, before its terms are signed. | The job's key |
| GET /api/health | Whether the site and its database answer. | None |
Rules of the road
- At most 11 new jobs a minute from one address. Past that the answer is 429.
- A refusal is JSON too: {"error": {"code", "message"}}, with fields when the request itself was wrong.
- Social Security numbers and card numbers are refused, not stored.
- Open a job for a real person who asked you to. The desk answers that person on the job's page.