Select Hardware Alternative
Selects which candidate hardware is currently chosen inside an alternative group of an order.
Prerequisites
Before selecting an alternative, you should first:
- Query the order using Get Order By Id to:
- Identify the target alternative group (
hardwares[].alternativeGroup.id) - Identify the candidate to select (
hardwares[].alternativeGroup.candidates[].id) - Verify the order status (must be
PENDINGorQUOTED)
- Identify the target alternative group (
Authentication
This endpoint requires authentication. See Authentication for details.
Request
Production URL: https://orchestrator.tecspal.com/
Sandbox URL: https://tecspal-orchestrator.sandbox.lexartlabs.uy/
Endpoint: POST /orders/{orderId}/hardware-alternatives/select
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| orderId | string | Yes | The unique identifier of the order |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
| companyCode | string | Yes | Company code for one of your managed companies |
| alternativeGroupId | string | Yes | Alternative group ID from hardwares[].alternativeGroup.id |
| hardwareRequestId | string | Yes | Candidate hardware request ID from alternativeGroup.candidates |
Example Request
{
"data": {
"companyCode": "ACME",
"alternativeGroupId": "group-uuid",
"hardwareRequestId": "hardware-uuid"
},
"request": "orders/464e51d8-bf40-4d51-863b-88042c5c345c/hardware-alternatives/select",
"vendor": "tecspal",
"verb": "POST"
}
Response Schema
| Property | Type | Description |
|---|---|---|
| statusCode | number | HTTP status code of the response (200 on success) |
| message | string | Description of the response status (e.g. Request successful) |
| envelop | array | Array containing the updated order |
Order Properties
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier of the order |
| orderNumber | number | Order number |
| createdAt | string | ISO timestamp when order was created |
| updatedAt | string | ISO timestamp when order was last updated |
| status | string | Status of the order (e.g. DELIVERED) |
| date | string | null | Delivery date (YYYY-MM-DD) |
| eta | string | null | Estimated delivery date (YYYY-MM-DD) |
| maxEta | number | null | Maximum estimated delivery date (YYYY-MM-DD) |
| minEta | number | null | Minimum estimated delivery date (YYYY-MM-DD) |
| trackingLink | string | null | Link for tracking the order |
| trackingCode | string | null | Code for tracking the order |
| countryCode | string | Country code (e.g. UY) |
| sendTo | string | Recipient type (e.g. EMPLOYEE, STORAGE) |
| currency | string | Currency used (e.g. USD) |
| dateCompleted | string | null | Date the order was completed |
| requesterEmail | string | null | Email of the person who requested the order (null if created via API) |
| companyName | string | Name of the company |
| employeeProfile | object | null | Employee profile info, if applicable |
| hardwares | array | List of hardware items requested |
| createdHardwares | array | List of hardware items actually created |
| apiClientRequesterName | string | null | Name of the API client that submitted the request (null if created by user) |
| poNumber | string | null | Purchase Order number, if provided |
| resellerIds | array | Array of reseller IDs matching the order's country (only for API-created orders) |
employeeProfile Properties
| Property | Type | Description |
|---|---|---|
| id | string | Employee ID |
| firstName | string | First name of the employee |
| lastName | string | Last name of the employee |
| string | Email address of the employee | |
| phone | string | null | Phone number with country code |
| governmentDNI | string | null | Government-issued identification number |
| city | string | null | City of residence |
| countryCode | string | Country code of the employee |
| address | string | Street address |
| addressExtraInfo | string | null | Additional address information |
| postCode | string | Postal code |
hardwares Properties
| Property | Type | Description |
|---|---|---|
| id | string | Hardware ID |
| brand | string | null | Brand name (if provided) |
| amount | number | Quantity of the item |
| notes | string | null | Notes associated with the item |
| quotedUnitPrice | string | null | Quoted price per unit (as string) |
| createdAt | string | ISO timestamp when item was added |
| catalogModelId | string | null | Optional catalog model reference |
| model | string | Model name of the hardware |
| hardwareType | string | Type of hardware (e.g. "PC", "MACBOOK") |
| ram | string | RAM configuration (if applicable) |
| diskSpace | string | Disk size (if applicable) |
| displaySize | string | Display size (if applicable) |
| processor | string | Processor (if applicable) |
| image | string | URL to the image |
| externalItemId | string | null | External item identifier (if provided) |
| serialNumbers | string[] | Array of serial numbers (if assigned) |
| isSelected | boolean | null | true if this row is the selected candidate of an alternative group; null if the hardware is not part of a group |
| isAvailable | boolean | null | Availability flag when the hardware is part of a group; null if not in a group |
| isRecommended | boolean | null | Recommendation flag when the hardware is part of a group; null if not in a group |
| alternativeGroup | object | null | Present when this hardware belongs to an alternative group (then it lists all candidates); null otherwise |
alternativeGroup Properties
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier of the alternative group |
| selectedId | string | null | ID of the currently selected hardware request (typically the same id as the parent hardware in hardwares[]) |
| candidates | array | Full list of candidates for this group (includes the selected item and alternatives) |
candidates Properties
Each candidate exposes the same base fields as hardwares except alternativeGroup (omitted on candidates to avoid recursion), plus:
| Property | Type | Description |
|---|---|---|
| isSelected | boolean | true for exactly one candidate per group (the chosen option) |
| isAvailable | boolean | null | Marked during quoting |
| isRecommended | boolean | null | Marked during quoting |
| isOriginalRequest | boolean | true for the original request in the group (earliest createdAt; ties broken by lexicographic id sorting) |
createdHardwares Properties
| Property | Type | Description |
|---|---|---|
| id | string | Unique ID of the created hardware |
| brand | string | null | Brand name (if applicable) |
| description | string | Description or notes |
| serialNumber | string | Serial number of the hardware |
| name | string | Name of the hardware |
| ram | string | RAM configuration (if applicable) |
| diskSpace | string | Disk size (if applicable) |
| displaySize | string | Display size (if applicable) |
| processor | string | Processor (if applicable) |
| image | string | URL to the image |
| cost | string | Purchase cost of the hardware |
| dateBought | string | Date the hardware was bought (ISO format) |
resellerIds Properties
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier of the reseller ID |
| code | string | Reseller code |
| countryCode | string | Country code matching the reseller's location |
Example Response
{
"envelop": [
{
"id": "464e51d8-bf40-4d51-863b-88042c5c345c",
"orderNumber": 10001011,
"status": "PENDING",
"hardwares": [
{
"id": "903c4984-0c15-4df8-bc93-aec7af8dc468",
"isSelected": false,
"alternativeGroup": {
"id": "268ad35a-68f5-46d5-b86a-2b4ee85e29c5",
"selectedId": "e385c323-d8f2-4fe3-b402-4c9e624ada70",
"candidates": [
{
"id": "903c4984-0c15-4df8-bc93-aec7af8dc468",
"isSelected": false,
"isOriginalRequest": true
},
{
"id": "e385c323-d8f2-4fe3-b402-4c9e624ada70",
"isSelected": true,
"isOriginalRequest": false
}
]
}
}
]
}
],
"message": "Request successful",
"statusCode": 200
}
Error Responses
Bad Request (400)
Missing Required Fields
{
"error": "Bad Request",
"message": "alternativeGroupId is required",
"statusCode": 400
}
Invalid Alternative Group
{
"error": "Bad Request",
"message": "Alternative group does not belong to this order",
"statusCode": 400
}
Invalid Candidate
{
"error": "Bad Request",
"message": "Hardware request is not a candidate of this group",
"statusCode": 400
}
Invalid Order Status
{
"error": "Bad Request",
"message": "Alternatives can only be modified when order is in PENDING or QUOTED status",
"statusCode": 400
}
Not Found (404)
{
"error": "Not Found",
"message": "Order request not found",
"statusCode": 404
}
Forbidden (403)
{
"error": "Forbidden",
"message": "Order request does not belong to this company",
"statusCode": 403
}
Unauthorized (401)
{
"error": "Unauthorized",
"message": "Unauthorized access",
"statusCode": 401
}
Notes
- Selection only changes candidate selection metadata inside the alternative group (
selectedIdandisSelectedflags). - The endpoint does not create or remove candidates; it only updates which one is selected.
- If you need to inspect all candidate fields after selection, call Get Order By Id.