79 lines
3.0 KiB
XML
79 lines
3.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<!DOCTYPE topic
|
||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
|
||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
||
title="Create a subuser registration" id="createSubuser">
|
||
|
||
<!-- AUTO-GENERATED, DO NOT EDIT -->
|
||
<p>This endpoint documentation is generated directly from <code>openapi.yaml</code>.</p>
|
||
<chapter title="Endpoint" id="endpoint">
|
||
<code-block lang="http">POST /subusers/me</code-block>
|
||
</chapter>
|
||
<chapter title="Operation" id="operation">
|
||
<p>Operation ID: <code>createSubuser</code></p>
|
||
<p>Creates a subuser (driver) account using a company's CVR and a phone number. Validates the
|
||
CVR via e-conomic, ensures the phone number is not already in use, and if SMS is enabled
|
||
sends a setup link by SMS for the user to complete registration.
|
||
</p>
|
||
</chapter>
|
||
<chapter title="Authentication" id="authentication"><p>No authentication required.</p></chapter>
|
||
<chapter title="Request Body" id="request-body">
|
||
<p>Required: yes.</p>
|
||
<p>Content type: <code>application/json</code></p>
|
||
<code-block lang="json">
|
||
{
|
||
"properties": {
|
||
"cvr": {
|
||
"description": "Danish CVR (8 digits)",
|
||
"example": 12345678,
|
||
"type": "integer"
|
||
},
|
||
"phone": {
|
||
"description": "Phone number (4–15 digits, no leading +)",
|
||
"example": 12345678,
|
||
"type": "integer"
|
||
},
|
||
"phone_country_code": {
|
||
"description": "Phone country code (1–3 digits)",
|
||
"example": 45,
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"required": [
|
||
"cvr",
|
||
"phone_country_code",
|
||
"phone"
|
||
],
|
||
"type": "object"
|
||
}
|
||
</code-block>
|
||
</chapter>
|
||
<chapter title="Responses" id="responses">
|
||
<table>
|
||
<tr><td>Status</td><td>Description</td><td>Content Types</td></tr>
|
||
<tr><td>200</td><td>Subuser created (or pending setup) and company identified</td><td>application/json</td></tr>
|
||
<tr><td>400</td><td></td><td></td></tr>
|
||
<tr><td>404</td><td></td><td></td></tr>
|
||
<tr><td>500</td><td></td><td></td></tr>
|
||
</table>
|
||
<p>Schema for response <code>200</code> (<code>application/json</code>):</p>
|
||
<code-block lang="json">
|
||
{
|
||
"properties": {
|
||
"customer_number": {
|
||
"description": "Matched e-conomic customer number",
|
||
"example": 1000,
|
||
"type": "integer"
|
||
},
|
||
"cvr": {
|
||
"example": 12345678,
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"type": "object"
|
||
}
|
||
</code-block>
|
||
</chapter>
|
||
</topic>
|