Skip to main content

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:

  1. 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 PENDING or QUOTED)

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

ParameterTypeRequiredDescription
orderIdstringYesThe unique identifier of the order

Request Body

PropertyTypeRequiredDescription
companyCodestringYesCompany code for one of your managed companies
alternativeGroupIdstringYesAlternative group ID from hardwares[].alternativeGroup.id
hardwareRequestIdstringYesCandidate 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

PropertyTypeDescription
statusCodenumberHTTP status code of the response (200 on success)
messagestringDescription of the response status (e.g. Request successful)
enveloparrayArray containing the updated order

Order Properties

PropertyTypeDescription
idstringUnique identifier of the order
orderNumbernumberOrder number
createdAtstringISO timestamp when order was created
updatedAtstringISO timestamp when order was last updated
statusstringStatus of the order (e.g. DELIVERED)
datestring | nullDelivery date (YYYY-MM-DD)
etastring | nullEstimated delivery date (YYYY-MM-DD)
maxEtanumber | nullMaximum estimated delivery date (YYYY-MM-DD)
minEtanumber | nullMinimum estimated delivery date (YYYY-MM-DD)
trackingLinkstring | nullLink for tracking the order
trackingCodestring | nullCode for tracking the order
countryCodestringCountry code (e.g. UY)
sendTostringRecipient type (e.g. EMPLOYEE, STORAGE)
currencystringCurrency used (e.g. USD)
dateCompletedstring | nullDate the order was completed
requesterEmailstring | nullEmail of the person who requested the order (null if created via API)
companyNamestringName of the company
employeeProfileobject | nullEmployee profile info, if applicable
hardwaresarrayList of hardware items requested
createdHardwaresarrayList of hardware items actually created
apiClientRequesterNamestring | nullName of the API client that submitted the request (null if created by user)
poNumberstring | nullPurchase Order number, if provided
resellerIdsarrayArray of reseller IDs matching the order's country (only for API-created orders)

employeeProfile Properties

PropertyTypeDescription
idstringEmployee ID
firstNamestringFirst name of the employee
lastNamestringLast name of the employee
emailstringEmail address of the employee
phonestring | nullPhone number with country code
governmentDNIstring | nullGovernment-issued identification number
citystring | nullCity of residence
countryCodestringCountry code of the employee
addressstringStreet address
addressExtraInfostring | nullAdditional address information
postCodestringPostal code

hardwares Properties

PropertyTypeDescription
idstringHardware ID
brandstring | nullBrand name (if provided)
amountnumberQuantity of the item
notesstring | nullNotes associated with the item
quotedUnitPricestring | nullQuoted price per unit (as string)
createdAtstringISO timestamp when item was added
catalogModelIdstring | nullOptional catalog model reference
modelstringModel name of the hardware
hardwareTypestringType of hardware (e.g. "PC", "MACBOOK")
ramstringRAM configuration (if applicable)
diskSpacestringDisk size (if applicable)
displaySizestringDisplay size (if applicable)
processorstringProcessor (if applicable)
imagestringURL to the image
externalItemIdstring | nullExternal item identifier (if provided)
serialNumbersstring[]Array of serial numbers (if assigned)
isSelectedboolean | nulltrue if this row is the selected candidate of an alternative group; null if the hardware is not part of a group
isAvailableboolean | nullAvailability flag when the hardware is part of a group; null if not in a group
isRecommendedboolean | nullRecommendation flag when the hardware is part of a group; null if not in a group
alternativeGroupobject | nullPresent when this hardware belongs to an alternative group (then it lists all candidates); null otherwise

alternativeGroup Properties

PropertyTypeDescription
idstringUnique identifier of the alternative group
selectedIdstring | nullID of the currently selected hardware request (typically the same id as the parent hardware in hardwares[])
candidatesarrayFull 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:

PropertyTypeDescription
isSelectedbooleantrue for exactly one candidate per group (the chosen option)
isAvailableboolean | nullMarked during quoting
isRecommendedboolean | nullMarked during quoting
isOriginalRequestbooleantrue for the original request in the group (earliest createdAt; ties broken by lexicographic id sorting)

createdHardwares Properties

PropertyTypeDescription
idstringUnique ID of the created hardware
brandstring | nullBrand name (if applicable)
descriptionstringDescription or notes
serialNumberstringSerial number of the hardware
namestringName of the hardware
ramstringRAM configuration (if applicable)
diskSpacestringDisk size (if applicable)
displaySizestringDisplay size (if applicable)
processorstringProcessor (if applicable)
imagestringURL to the image
coststringPurchase cost of the hardware
dateBoughtstringDate the hardware was bought (ISO format)

resellerIds Properties

PropertyTypeDescription
idstringUnique identifier of the reseller ID
codestringReseller code
countryCodestringCountry 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 (selectedId and isSelected flags).
  • 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.