List external units
GET /v1/api/units.json
Operation id: listExternalUnits
Description
Lists units for the given domain (LIST^UNITS). Route consumes application/json for matching; send Content-Type: application/json if required by the gateway.
Tags: Units
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
include_closed_units | boolean | No | Include closed units in the response. |
page_number | integer | No | 1-based page number. |
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
X-reflexis-auth-token-X | string | Yes | Mandatory auth token header value provided by the user. |
Responses
200 — List of units
Content type: application/json
400 — One or more request parameters are invalid.
Content type: application/json
401 — Authentication failed. The request is missing a token, the token is invalid, or the token has expired.
Content type: application/json
403 — User lacks the required permission for this operation.
Content type: application/json
500 — An unexpected error occurred while processing the request.
Content type: application/json
Response models
200 — List of units
Content type: application/json
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"example": "unit"
},
"unit_id": {
"type": "string"
},
"unit_name": {
"type": "string"
},
"parent_unit_id": {
"type": "string"
},
"parent_unit_name": {
"type": "string"
},
"status": {
"type": "string"
},
"store_status": {
"type": "string"
},
"org_level": {
"type": "integer"
},
"level_id": {
"type": "string"
},
"unit_level": {
"type": "string"
},
"max_child_level": {
"type": "integer"
},
"time_zone": {
"type": "string"
},
"timezone_short": {
"type": "string"
},
"timezone_long": {
"type": "string"
},
"unit_category": {
"type": "string"
},
"currency": {
"type": "string"
},
"language": {
"type": "string"
},
"email_id": {
"type": "string",
"format": "email"
},
"tel_no": {
"type": "string"
},
"contact_person": {
"type": "string"
},
"job_title": {
"type": "string"
},
"street": {
"type": "string"
},
"city": {
"type": "string"
},
"county": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"domain_id": {
"type": "string"
},
"domain_no": {
"type": "integer",
"format": "int64"
},
"created_by": {
"type": "integer",
"format": "int64"
},
"updated_by": {
"type": "integer",
"format": "int64"
},
"created_on": {
"type": "integer",
"format": "int64",
"description": "Epoch time in milliseconds."
},
"updated_on": {
"type": "integer",
"format": "int64",
"description": "Epoch time in milliseconds."
},
"close_date": {
"type": "integer",
"format": "int64"
},
"closed_eff_date_skey": {
"type": "integer"
},
"closed_end_date_skey": {
"type": "integer"
},
"eff_date_skey": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"end_date_skey": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"dept_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"store_groups": {
"type": "array",
"items": {
"type": "object"
}
},
"unit_skey": {
"type": "integer",
"format": "int64"
},
"location": {
"type": "object",
"properties": {
"coordinates": {
"type": "array",
"items": {
"type": "number"
}
},
"type": {
"type": "string"
}
}
},
"unit_attr_0304": {
"type": "object"
},
"unit_attr_attribute05": {
"type": "object"
}
}
}
}
400 — One or more request parameters are invalid.
Content type: application/json
Schema
Structured error envelope returned by external gateway endpoints (/v1/api/*). Wraps a single error object with type, code, human-readable message, the offending param (when applicable), and an optional documentation URL.
| Property | Type | Required | Description |
|---|---|---|---|
error | object | No |
{
"type": "object",
"description": "Structured error envelope returned by external gateway endpoints (`/v1/api/*`).\nWraps a single `error` object with `type`, `code`, human-readable `message`, the offending\n`param` (when applicable), and an optional documentation URL.\n",
"properties": {
"error": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "High-level error category (for example `unauthorized`, `invalid_parameter`, `validation_error`).",
"example": "invalid_parameter"
},
"code": {
"type": "string",
"description": "Machine-readable error code; clients should branch on this rather than `message`.",
"example": "invalid_parameter"
},
"message": {
"type": "string",
"description": "Human-readable description of the error.",
"example": "One or more request parameters are invalid."
},
"param": {
"type": "string",
"description": "Name of the request parameter or field that caused the error, when applicable.",
"example": "page_number",
"nullable": true
},
"doc_url": {
"type": "string",
"description": "Optional URL to documentation describing the error.",
"example": "https://{APP_URL}/kernel/errors/invalid_parameter",
"nullable": true
}
}
}
}
}
401 — Authentication failed. The request is missing a token, the token is invalid, or the token has expired.
Content type: application/json
Schema
Structured error envelope returned by external gateway endpoints (/v1/api/*). Wraps a single error object with type, code, human-readable message, the offending param (when applicable), and an optional documentation URL.
| Property | Type | Required | Description |
|---|---|---|---|
error | object | No |
{
"type": "object",
"description": "Structured error envelope returned by external gateway endpoints (`/v1/api/*`).\nWraps a single `error` object with `type`, `code`, human-readable `message`, the offending\n`param` (when applicable), and an optional documentation URL.\n",
"properties": {
"error": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "High-level error category (for example `unauthorized`, `invalid_parameter`, `validation_error`).",
"example": "invalid_parameter"
},
"code": {
"type": "string",
"description": "Machine-readable error code; clients should branch on this rather than `message`.",
"example": "invalid_parameter"
},
"message": {
"type": "string",
"description": "Human-readable description of the error.",
"example": "One or more request parameters are invalid."
},
"param": {
"type": "string",
"description": "Name of the request parameter or field that caused the error, when applicable.",
"example": "page_number",
"nullable": true
},
"doc_url": {
"type": "string",
"description": "Optional URL to documentation describing the error.",
"example": "https://{APP_URL}/kernel/errors/invalid_parameter",
"nullable": true
}
}
}
}
}
403 — User lacks the required permission for this operation.
Content type: application/json
Schema
Structured error envelope returned by external gateway endpoints (/v1/api/*). Wraps a single error object with type, code, human-readable message, the offending param (when applicable), and an optional documentation URL.
| Property | Type | Required | Description |
|---|---|---|---|
error | object | No |
{
"type": "object",
"description": "Structured error envelope returned by external gateway endpoints (`/v1/api/*`).\nWraps a single `error` object with `type`, `code`, human-readable `message`, the offending\n`param` (when applicable), and an optional documentation URL.\n",
"properties": {
"error": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "High-level error category (for example `unauthorized`, `invalid_parameter`, `validation_error`).",
"example": "invalid_parameter"
},
"code": {
"type": "string",
"description": "Machine-readable error code; clients should branch on this rather than `message`.",
"example": "invalid_parameter"
},
"message": {
"type": "string",
"description": "Human-readable description of the error.",
"example": "One or more request parameters are invalid."
},
"param": {
"type": "string",
"description": "Name of the request parameter or field that caused the error, when applicable.",
"example": "page_number",
"nullable": true
},
"doc_url": {
"type": "string",
"description": "Optional URL to documentation describing the error.",
"example": "https://{APP_URL}/kernel/errors/invalid_parameter",
"nullable": true
}
}
}
}
}
500 — An unexpected error occurred while processing the request.
Content type: application/json
Schema
Structured error envelope returned by external gateway endpoints (/v1/api/*). Wraps a single error object with type, code, human-readable message, the offending param (when applicable), and an optional documentation URL.
| Property | Type | Required | Description |
|---|---|---|---|
error | object | No |
{
"type": "object",
"description": "Structured error envelope returned by external gateway endpoints (`/v1/api/*`).\nWraps a single `error` object with `type`, `code`, human-readable `message`, the offending\n`param` (when applicable), and an optional documentation URL.\n",
"properties": {
"error": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "High-level error category (for example `unauthorized`, `invalid_parameter`, `validation_error`).",
"example": "invalid_parameter"
},
"code": {
"type": "string",
"description": "Machine-readable error code; clients should branch on this rather than `message`.",
"example": "invalid_parameter"
},
"message": {
"type": "string",
"description": "Human-readable description of the error.",
"example": "One or more request parameters are invalid."
},
"param": {
"type": "string",
"description": "Name of the request parameter or field that caused the error, when applicable.",
"example": "page_number",
"nullable": true
},
"doc_url": {
"type": "string",
"description": "Optional URL to documentation describing the error.",
"example": "https://{APP_URL}/kernel/errors/invalid_parameter",
"nullable": true
}
}
}
}
}