Configure end-user/activation details and fulfill document requirements
PATCH /v1/ports/{id}
Organization DEVELOPER session or project key with lines:write for writes, membership/lines:read for reads. Agent credentials alone are insufficient. Carrier outcomes may be asynchronous; follow returned references.
Operation ID: patch__v1_ports_id.
Authentication
Use one of these authentication alternatives. Schemes on the same line are required together:
sessionCookie(cookie: ordan_session)bearerKey(bearer token)
Organization roles, key scopes, grant capabilities, policy and spend limits still apply. See Authentication.
Request
Path parameters
| Parameter | Type | Required | Description / constraints |
|---|---|---|---|
id | string | Yes | — |
Body (required)
Content type: application/json
Type: object
Required means required within its containing object, when that object is present. Union/conditional constraints remain defined by the JSON Schema below.
| Field | Type | Presence | Description / constraints |
|---|---|---|---|
end_user | object | Optional | Additional properties allowed |
end_user.admin | object | Required | Additional properties allowed |
end_user.admin.account_number | string | Required | writeOnly |
end_user.admin.auth_person_name | string | Required | — |
end_user.admin.billing_phone_number | string | Required | pattern: ^\+[1-9][0-9]{6,14}$ |
end_user.admin.entity_name | string | Required | — |
end_user.admin.pin_passcode | string | Optional | writeOnly |
end_user.location | object | Required | Additional properties allowed |
end_user.location.administrative_area | string | Required | — |
end_user.location.country_code | Exactly US | Required | — |
end_user.location.extended_address | string | Optional | — |
end_user.location.locality | string | Required | — |
end_user.location.postal_code | string | Required | — |
end_user.location.street_address | string | Required | — |
foc_datetime_requested | string (date-time) | Optional | — |
requirements | Array of object | Optional | — |
requirements[].document_type | loa, invoice | Required | — |
requirements[].requirement_type_id | string (uuid) | Required | — |
JSON Schema
json
{
"additionalProperties": true,
"properties": {
"end_user": {
"additionalProperties": true,
"properties": {
"admin": {
"additionalProperties": true,
"properties": {
"account_number": {
"type": "string",
"writeOnly": true
},
"auth_person_name": {
"type": "string"
},
"billing_phone_number": {
"examples": [
"+12125550101"
],
"pattern": "^\\+[1-9][0-9]{6,14}$",
"type": "string"
},
"entity_name": {
"type": "string"
},
"pin_passcode": {
"type": "string",
"writeOnly": true
}
},
"required": [
"entity_name",
"auth_person_name",
"billing_phone_number",
"account_number"
],
"type": "object"
},
"location": {
"additionalProperties": true,
"properties": {
"administrative_area": {
"type": "string"
},
"country_code": {
"const": "US"
},
"extended_address": {
"type": "string"
},
"locality": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"street_address": {
"type": "string"
}
},
"required": [
"street_address",
"locality",
"administrative_area",
"postal_code",
"country_code"
],
"type": "object"
}
},
"required": [
"admin",
"location"
],
"type": "object"
},
"foc_datetime_requested": {
"format": "date-time",
"type": "string"
},
"requirements": {
"items": {
"additionalProperties": true,
"properties": {
"document_type": {
"enum": [
"loa",
"invoice"
],
"type": "string"
},
"requirement_type_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"requirement_type_id",
"document_type"
],
"type": "object"
},
"type": "array"
}
},
"type": "object"
}Request examples
These are request templates, not executed requests. Replace REPLACE_… and <…> placeholders, set the credential environment variables, and supply any conditional fields your action needs. JSON values are illustrative, not live records. Use a stable idempotency key per logical operation.
bash
curl --request PATCH --url 'https://api.ordan.io/v1/ports/REPLACE_id' \
--header "Authorization: Bearer $ORDAN_API_KEY" \
--header "Content-Type: application/json" \
--data-raw '{}'js
const response = await fetch("https://api.ordan.io/v1/ports/REPLACE_id", {
method: "PATCH",
headers: {
"Authorization": "Bearer " + process.env.ORDAN_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const text = await response.text();
if (!response.ok) throw new Error(`${response.status}: ${text}`);
const result = text ? JSON.parse(text) : null;python
import json
import os
from urllib.request import Request, urlopen
request = Request("https://api.ordan.io/v1/ports/REPLACE_id",
method="PATCH",
headers={
"Authorization": "Bearer " + os.environ["ORDAN_API_KEY"],
"Content-Type": "application/json",
},
data="{}".encode("utf-8"),
)
with urlopen(request, timeout=30) as response:
text = response.read().decode("utf-8")
result = json.loads(text) if text else NoneResponses
| Status | Meaning |
|---|---|
400 | Invalid request; device token polling uses RFC 8628 string errors |
402 | spend_limit_exceeded: inspect details.scope (org/grant/line) and outstanding_micros |
403 | Missing authority, policy_violation, approval_required (details.approval_request), limit_reached, destination_not_supported or feature_disabled (details.feature) |
409 | Conflict, idempotency in progress, or a2p_registration_pending; retrieve state instead of duplicating work |
422 | validation_error: the request is not valid; details name each field |
429 | Rate limited; back off and retain the same idempotency key |
502 | provider_error: unknown routes need verified quotes; ambiguous operations retain resource references and cost holds |
2XX | Success (created objects use 201) |
default | Error |
Status ranges such as 2XX are retained exactly as declared. See Errors and recovery for retries and pending outcomes.
400 response
Content type: application/json
Type: Error
Required means required within its containing object, when that object is present. Union/conditional constraints remain defined by the JSON Schema below.
| Field | Type | Presence | Description / constraints |
|---|---|---|---|
error | object | Required | Additional properties allowed |
error.code | string | Required | — |
error.details | object | Optional | Additional properties allowed |
error.message | string | Required | — |
JSON Schema
json
{
"$ref": "#/components/schemas/Error"
}2XX response
Content type: application/json
Type: Port
Required means required within its containing object, when that object is present. Union/conditional constraints remain defined by the JSON Schema below.
| Field | Type | Presence | Description / constraints |
|---|---|---|---|
attention_reasons | Array of string | Optional | — |
carrier_refs | Array of string | Optional | — |
confirmed_at | anyOf: string (date-time); null | Optional | — |
documents | object | Optional | Additional properties allowed |
documents.invoice | boolean | Optional | — |
documents.loa | boolean | Optional | — |
end_user_provided | boolean | Optional | — |
id | string | Required | Public port_… reference (not a UUID). pattern: ^port_[0-7][0-9A-HJKMNP-TV-Z]{25}$ |
number | anyOf: string; null | Optional | — |
org | string | Optional | Public org_… reference (not a UUID). pattern: ^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$ |
phone_number | string | Optional | pattern: ^\+[1-9][0-9]{6,14}$ |
status | submitted, draft, pending, needs_attention, cancel_pending, activated, rejected, canceled | Required | — |
JSON Schema
json
{
"$ref": "#/components/schemas/Port"
}Illustrative response template
Placeholder values show the shape, not a live response. Nullable costs remain null rather than implying zero usage.
json
{
"attention_reasons": [
"<attention_reasons>"
],
"carrier_refs": [
"<carrier_refs>"
],
"confirmed_at": null,
"documents": {
"invoice": false,
"loa": false
},
"end_user_provided": false,
"id": "<id>",
"number": null,
"org": "<org>",
"phone_number": "+12125550101",
"status": "submitted"
}default response
Content type: application/json
Type: Error
Required means required within its containing object, when that object is present. Union/conditional constraints remain defined by the JSON Schema below.
| Field | Type | Presence | Description / constraints |
|---|---|---|---|
error | object | Required | Additional properties allowed |
error.code | string | Required | — |
error.details | object | Optional | Additional properties allowed |
error.message | string | Required | — |
JSON Schema
json
{
"$ref": "#/components/schemas/Error"
}