Luxor PlatformAPI DocumentationCommanderParts

Create part

Creates one part per site in site_ids — a part belongs to exactly one site, so stocking a part at three sites creates three parts. Each is assigned a server-generated SKU (e.g. HB-0001); SKUs cannot be supplied. Returns every created part. Parts are always created with an on-hand quantity of 0: there is no opening-quantity field, so seed stock with a follow-up POST /v2/commander/parts/{part_id}/stock/adjust for each created part.

POST
/v2/commander/parts

Authorization

LuxorAPIKey
authorization<token>

Use your API key here.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v2/commander/parts" \  -H "Content-Type: application/json" \  -d '{    "site_ids": [      "ab580781-02e2-4a18-ac1b-8fc9be2f4ad4"    ],    "name": "S21 Pro Hashboard",    "category": "hashboard"  }'
{  "parts": [    {      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",      "sku": "HB-0001",      "site_id": "b0a5fad8-1234-5678-9abc-def012345678",      "url": "/v2/commander/parts/a1b2c3d4-e5f6-7890-abcd-ef1234567890"    }  ]}
{  "statusCode": 400,  "code": "FST_ERR_VALIDATION",  "error": "Bad Request",  "message": "body/end_date Required"}
{  "statusCode": 403,  "code": "7",  "error": "Forbidden",  "message": "[permission_denied] site_id does not belong to this workspace"}