> For the complete documentation index, see [llms.txt](https://docs.partssource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.partssource.com/api-customer/preview/orders.md).

# Orders

Orders

## Create order

> Creates a new order with line items. Requires 'Idempotency-Key' header.

```json
{"openapi":"3.0.1","info":{"title":"Customer API","version":"v1"},"tags":[{"name":"orders","description":"Orders"}],"servers":[{"url":"https://api.partssource.com/customer","description":"Production Environment"}],"security":[{"customer-api-authorizer":[],"api-key":[]}],"components":{"securitySchemes":{"customer-api-authorizer":{"type":"apiKey","description":"AWS Cognito JWT token. Include as 'Authorization: Bearer {token}' header.","name":"Authorization","in":"header"}},"schemas":{"CreateOrderRequest":{"required":["billingAddressId","facilityId","payment","quoteItems","requesterId","shippingAddressId","shippingMethod","userId"],"type":"object","properties":{"requesterId":{"maximum":99999999,"minimum":1,"type":"integer","description":"Customer number placing the order.","format":"int64"},"userId":{"maximum":99999999,"minimum":1,"type":"integer","description":"User ID of the person creating the order.","format":"int64"},"facilityId":{"maximum":99999999,"minimum":1,"type":"integer","description":"Facility ID from customer profile.","format":"int64"},"shippingAddressId":{"maximum":99999999,"minimum":1,"type":"integer","description":"Shipping address ID from customer profile.","format":"int64"},"billingAddressId":{"maximum":99999999,"minimum":1,"type":"integer","description":"Billing address ID from customer profile.","format":"int64"},"shippingMethod":{"minLength":1,"type":"string","description":"Shipping method for the order."},"useShippingAccount":{"type":"boolean","description":"Indicates whether to use the customer's shipping account."},"quoteItems":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/OrderItem"},"description":"List of items to order."},"payment":{"$ref":"#/components/schemas/PaymentData"},"notes":{"maxLength":200,"minLength":0,"type":"string","description":"Special instructions or notes for the order.","nullable":true},"attnLineFormat":{"$ref":"#/components/schemas/AttnLineFormat"},"attnLineCustomText":{"maxLength":120,"minLength":0,"type":"string","description":"Literal ATTN line text to use when CustomerApi.Models.Orders.CreateOrderRequest.AttnLineFormat is `custom_text`. Ignored\r\nfor other modes. 120 is the real column width of\r\n`PARTS.SLS_SHIPPING_DOCUMENTS.SHIP_ATTENTION_TO` — not a display limit (which is enforced\r\nas a warning, not a rejection).","nullable":true}},"additionalProperties":false,"description":"Request payload for creating a new order."},"OrderItem":{"required":["price","priceOptionId","productId","quantity"],"type":"object","properties":{"priceOptionId":{"minLength":1,"type":"string","description":"Price option identifier for the item."},"productId":{"minLength":1,"type":"string","description":"Part number to order."},"quantity":{"maximum":2147483647,"minimum":1,"type":"integer","description":"Quantity to order.","format":"int32"},"price":{"type":"number","description":"Unit price at time of order.","format":"double"},"requiredFields":{"type":"array","items":{"$ref":"#/components/schemas/RequiredField"},"description":"List of required fields for the order.","nullable":true},"isCriticalHardDown":{"type":"boolean","description":"Indicates this line item is Critical Hard Down (urgency level 1 - \"Need Immediately\").\r\nWhen true, this line item will be created with UrgencyId = 1 (STAT)."}},"additionalProperties":false,"description":"Individual line item in an order."},"RequiredField":{"type":"object","properties":{"fieldId":{"type":"string","description":"The unique identifier for the field (from Pricing API).","nullable":true},"value":{"type":"string","description":"The submitted value for this field.","nullable":true}},"additionalProperties":false,"description":"Field/value pair for vendor-required fields."},"PaymentData":{"required":["paymentMethod"],"type":"object","properties":{"paymentMethod":{"minLength":1,"pattern":"^(CC|PO)$","type":"string","description":"Payment method: \"CC\" for credit card, \"PO\" for purchase order."},"poNumber":{"maxLength":50,"minLength":0,"type":"string","description":"Purchase order number. Required for PO orders.\r\nFor CC orders, defaults to \"CC\" if not provided.","nullable":true}},"additionalProperties":false,"description":"Payment information for an order."},"AttnLineFormat":{"enum":["requester_only","po_and_requester","custom_text"],"type":"string","description":"Selects how the shipping ATTN line (\"attention to\") is composed for an order.\n\nPossible values:\n- `requester_only`\n- `po_and_requester`\n- `custom_text`"},"CreateOrderResponseApiResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreateOrderResponse"},"correlationId":{"type":"string","nullable":true},"timestamp":{"type":"string","format":"date-time"}},"additionalProperties":false},"CreateOrderResponse":{"required":["createdAt","orderNumber"],"type":"object","properties":{"orderNumber":{"minLength":1,"type":"string","description":"Newly created order number."},"createdAt":{"type":"string","description":"Order creation timestamp.","format":"date-time"},"eventId":{"type":"string","description":"Event identifier used when publishing the order creation event.","nullable":true},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal warnings raised while creating the order — e.g. the composed ATTN line exceeded\r\nthe display limit and was truncated for display only (the full value is still stored).\r\nAbsent from the response when there are none.","nullable":true}},"additionalProperties":false,"description":"Response payload for order creation."},"ApiProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true},"correlationId":{"type":"string","nullable":true},"errors":{"type":"array","items":{"type":"string"},"nullable":true},"timestamp":{"type":"string","format":"date-time"},"service":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/orders":{"post":{"tags":["orders"],"summary":"Create order","description":"Creates a new order with line items. Requires 'Idempotency-Key' header.","operationId":"CreateOrder","parameters":[{"name":"Idempotency-Key","in":"header","description":"Unique identifier for idempotency. If the same request is retried with the same key, the original response is returned.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Order request with line items and shipping details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}}}},"responses":{"200":{"description":"Order created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderResponseApiResponse"}}}},"400":{"description":"Validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblemDetails"}}}},"403":{"description":"CompanyId does not match authorized tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblemDetails"}}}},"502":{"description":"External Orders API error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblemDetails"}}}}}}}}}
```

## Get order

> Gets current status and details for an order. Line items use the canonical customer line-detail schema; the shipping address fields line1/line2/zip are deprecated in favor of address1/address2/zipCode.

```json
{"openapi":"3.0.1","info":{"title":"Customer API","version":"v1"},"tags":[{"name":"orders","description":"Orders"}],"servers":[{"url":"https://api.partssource.com/customer","description":"Production Environment"}],"security":[{"customer-api-authorizer":[],"api-key":[]}],"components":{"securitySchemes":{"customer-api-authorizer":{"type":"apiKey","description":"AWS Cognito JWT token. Include as 'Authorization: Bearer {token}' header.","name":"Authorization","in":"header"}},"schemas":{"CustomerOrderDetailsApiResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CustomerOrderDetails"},"correlationId":{"type":"string","nullable":true},"timestamp":{"type":"string","format":"date-time"}},"additionalProperties":false},"CustomerOrderDetails":{"type":"object","properties":{"orderId":{"type":"integer","format":"int64"},"orderDate":{"type":"string","format":"date-time"},"lastUpdated":{"type":"string","format":"date-time","nullable":true},"total":{"type":"number","format":"double"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOrderLineDetail"},"nullable":true},"shippingAddress":{"$ref":"#/components/schemas/CustomerAddressInfo"}},"additionalProperties":false,"description":"Customer-facing order details with filtered information"},"CustomerOrderLineDetail":{"type":"object","properties":{"lineItemId":{"type":"integer","format":"int64"},"partNumber":{"type":"string","description":"Sourced/fulfilled part number.","nullable":true},"sourcedPartNumber":{"type":"string","description":"Canonical alias for CustomerApi.Models.Orders.CustomerOrderLineDetail.PartNumber (the sourced part number).","nullable":true},"requestedPartNumber":{"type":"string","description":"Part number originally requested by the customer.","nullable":true},"customerPoNumber":{"type":"string","description":"PO number the customer issued to PartsSource. Absent for punchout orders.","nullable":true},"customerLineKey":{"type":"string","description":"Customer's own line identifier. Absent for punchout orders. Phase 2.","nullable":true},"description":{"type":"string","nullable":true},"quantity":{"type":"integer","format":"int32"},"price":{"type":"number","description":"Line price. Preserves the prior endpoint's meaning (the extended line total).","format":"double"},"psListPrice":{"type":"number","format":"double","nullable":true},"tax":{"type":"number","format":"double","nullable":true},"shipCost":{"type":"number","format":"double","nullable":true},"status":{"type":"string","description":"Composite human-friendly status name.","nullable":true},"statusId":{"type":"integer","format":"int32","nullable":true},"manufacturerId":{"type":"integer","description":"OEM/manufacturer id (SLS_LINE_ITEMS.OEM_ID). Part/depot lines only; absent if not set upstream.","format":"int64","nullable":true},"manufacturer":{"type":"string","description":"OEM/manufacturer name. Part/depot lines only.","nullable":true},"condition":{"type":"string","description":"Part condition (e.g. OEM, Refurbished), sourced from the selected vendor-research row. Part/depot lines only; absent until a vendor is selected.","nullable":true},"uom":{"type":"string","description":"Unit of measure (e.g. EA, BX, KT) — SLS_LINE_ITEMS.UOM_ID via CT.CT_UNITS_OF_MEASURE.","nullable":true},"lineItemType":{"type":"string","description":"Line item type vocabulary (part, depot_flat_rate, depot_quoted, service, talent).\r\nDerived from OrderTypeId + ConditionId, mirroring ps-portal's LineItemContextDataModel\r\nmapping. \"talent\" has no known OrderTypeId mapping today, so it never appears.","nullable":true},"carrier":{"type":"string","description":"Carrier of the shipment. Absent until the line has actually shipped (per the updated\r\nAP-21368 spec); before that, CustomerApi.Models.Orders.CustomerOrderLineDetail.PlannedCarrier carries the instructed carrier.\r\nValue is the shipping document's carrier — see CustomerApi.Models.Orders.CustomerOrderLineDetail.PlannedCarrier for the known\r\n\"actual vs. planned\" source nuance.","nullable":true},"shipMethod":{"type":"string","description":"Ship method of the shipment. Absent until shipped, like CustomerApi.Models.Orders.CustomerOrderLineDetail.Carrier.","nullable":true},"plannedCarrier":{"type":"string","description":"Carrier instructed to the supplier (the shipping document's carrier — the same source\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.Carrier currently uses). A separate, more precisely \"actual\" carrier exists\r\non PARTS.SHP_TRACKING_NUMBERS.SHIP_VIA_ID once a shipment is tracked, but re-pointing\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.Carrier at it is a behavior change deferred to a future pass.","nullable":true},"plannedShipMethod":{"type":"string","nullable":true},"useShippingAccount":{"type":"boolean","description":"True when SLS_SHIPPING_DOCUMENTS.SHIP_ACCOUNT_ID indicates the customer's own carrier\r\naccount (vs. PartsSource's). Absent when there's no shipping document yet.","nullable":true},"trackingNumber":{"type":"string","description":"Present as soon as a shipping label exists (an active PARTS.SHP_TRACKING_NUMBERS row),\r\nwhich can be before the line ships — per the updated AP-21368 spec.","nullable":true},"shippedAt":{"type":"string","description":"PARTS.SHP_TRACKING_NUMBERS.DATE_SHIPPED. Absent until shipped.","format":"date-time","nullable":true},"deliveredAt":{"type":"string","description":"Absent until delivered.","format":"date-time","nullable":true},"estimatedShipDate":{"type":"string","description":"Current committed ESD (PARTS.ESTIMATED_SHIP_DATE.ESD, active row). Absent if none committed.","format":"date-time","nullable":true},"ifOrderedBy":{"type":"string","description":"No known persisted source for the order-creation-time cutoff. Stays absent (Phase 2).","format":"date-time","nullable":true},"facilityId":{"type":"integer","description":"No known per-line facility concept in this repo — stays absent (Phase 2).","format":"int64","nullable":true},"facilityName":{"type":"string","nullable":true},"requesterId":{"type":"integer","format":"int64","nullable":true},"requester":{"type":"string","nullable":true},"orderedById":{"type":"integer","description":"SLS_ORDERS.CREATED_USER_ID — the person who keyed the order (distinct from the requester).","format":"int64","nullable":true},"orderedBy":{"type":"string","nullable":true},"lineType":{"type":"string","nullable":true},"originatingLineItemId":{"type":"integer","format":"int64","nullable":true},"exceptionReason":{"type":"string","nullable":true},"isCriticalHardDown":{"type":"boolean","description":"True when SLS_LINE_ITEMS.URGENCY_ID = 1 (the repo-wide critical-hard-down convention).","nullable":true},"isExchangeRequired":{"type":"boolean","description":"True when the selected vendor-research row has a non-zero EXCHANGE_COST.","nullable":true},"activeExchangeId":{"type":"integer","format":"int64","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"fees":{"type":"array","items":{"$ref":"#/components/schemas/FeeSummary"},"description":"Non-zero fees applied to the line (PARTS.SLS_PURCHASE_LINES). Absent when there are none.","nullable":true},"activeReturns":{"type":"array","items":{"$ref":"#/components/schemas/ActiveReturnSummary"},"description":"Active (non-terminal) return requests against this line — PARTS.RGA_HEADERS excluding\r\nCANX/CLOSED/VOID statuses, per InternalApi's GetActiveRgasByLineItem.sql rule. Unlike the\r\nother collections this is <strong>always serialized</strong> — an empty array when there\r\nare none (per AP-21368 spec).","nullable":true},"notes":{"type":"array","items":{"$ref":"#/components/schemas/NoteSummary"},"description":"External, web-visible notes (PARTS.SLS_LINE_ITEM_NOTES, WEB_NOTE = 'Y'; internal notes\r\nare never returned). Absent (not empty) when there are none.","nullable":true}},"additionalProperties":false,"description":"Canonical customer-facing line-item detail. Shared shape used by\r\nGET /orders/{orderId}, GET /orders/search?include=lineItems (AP-21369), and\r\n(future, AP-21355) GET /lines/{lineItemId}, so all endpoints return schema-identical\r\nline data.\r\n\r\n\r\nPhase 1 (AP-21368) populated only the fields the upstream Order API already returned.\r\nPhase 2a extended the upstream Order.Api query (`OrderRepository.PopulateLineItemsAsync`)\r\nwith a few more joins/columns and now populates: CustomerApi.Models.Orders.CustomerOrderLineDetail.ManufacturerId,\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.Manufacturer, CustomerApi.Models.Orders.CustomerOrderLineDetail.Condition, CustomerApi.Models.Orders.CustomerOrderLineDetail.LineItemType,\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.EstimatedShipDate, CustomerApi.Models.Orders.CustomerOrderLineDetail.IsCriticalHardDown,\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.IsExchangeRequired, CustomerApi.Models.Orders.CustomerOrderLineDetail.ShippedAt, and CustomerApi.Models.Orders.CustomerOrderLineDetail.ActiveReturns.\r\n(`backorderEta` was in earlier drafts but was removed from the spec on 2026-07-30 as\r\nredundant to CustomerApi.Models.Orders.CustomerOrderLineDetail.EstimatedShipDate — do not re-add it. A per-unit `unitPrice`\r\nwas also in an earlier draft but is not part of the canonical AP-21355 schema.)\r\n\r\n\r\nThe remaining fields (CustomerApi.Models.Orders.CustomerOrderLineDetail.Uom, CustomerApi.Models.Orders.CustomerOrderLineDetail.CustomerLineKey, planned vs. actual\r\nshipping account fields, CustomerApi.Models.Orders.CustomerOrderLineDetail.OrderedBy/CustomerApi.Models.Orders.CustomerOrderLineDetail.OrderedById,\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.IfOrderedBy, warranty/requote/split/exchange linkage, CustomerApi.Models.Orders.CustomerOrderLineDetail.Fees,\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.Notes) have no known data source anywhere in this repo today — see the\r\nAP-21368/AP-21369 spec doc for the per-field gap analysis. They stay nullable and annotated\r\n`[JsonIgnore(WhenWritingNull)]` so they're simply absent until a source is found.\r\n(MVC controllers here do not drop nulls globally, so the annotation is required per-property.)\r\n"},"FeeSummary":{"type":"object","properties":{"name":{"type":"string","description":"Fee name, e.g. `processingFee`, `manufacturerFee`.","nullable":true},"value":{"type":"number","format":"double"}},"additionalProperties":false,"description":"A single non-zero fee applied to a line item."},"ActiveReturnSummary":{"type":"object","properties":{"returnId":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int32"},"statusName":{"type":"string","nullable":true},"requestedAt":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Summary of an active (non-terminal) return request against a line item."},"NoteSummary":{"type":"object","properties":{"noteId":{"type":"integer","format":"int64"},"note":{"type":"string","nullable":true},"addedBy":{"type":"string","nullable":true},"addedById":{"type":"integer","format":"int64","nullable":true},"addedAt":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false,"description":"An external, web-visible note on a line item."},"CustomerAddressInfo":{"type":"object","properties":{"shipAddressId":{"type":"integer","format":"int64","nullable":true},"name":{"type":"string","nullable":true},"attentionTo":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"address3":{"type":"string","description":"Third address line. Phase 2 (not in the upstream shipping payload today).","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"ediSenderCode":{"type":"string","description":"EDI sender code. Phase 2 (not in the upstream shipping payload today).","nullable":true},"line1":{"type":"string","nullable":true,"deprecated":true},"line2":{"type":"string","nullable":true,"deprecated":true},"zip":{"type":"string","nullable":true,"deprecated":true}},"additionalProperties":false,"description":"Customer-facing address info.\r\n\r\n\r\nAP-21368 expands and renames these fields. `address1`/`address2`/`zipCode`\r\nare the canonical names; `line1`/`line2`/`zip` remain populated but are\r\ndeprecated. `address3` and `ediSenderCode` are declared for schema completeness\r\nand populated in Phase 2.\r\n"},"ApiProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true},"correlationId":{"type":"string","nullable":true},"errors":{"type":"array","items":{"type":"string"},"nullable":true},"timestamp":{"type":"string","format":"date-time"},"service":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/orders/{orderId}":{"get":{"tags":["orders"],"summary":"Get order","description":"Gets current status and details for an order. Line items use the canonical customer line-detail schema; the shipping address fields line1/line2/zip are deprecated in favor of address1/address2/zipCode.","operationId":"GetOrder","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Order details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOrderDetailsApiResponse"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblemDetails"}}}}}}}}}
```

## Search orders

> Searches orders using structured query syntax, scoped to the authenticated tenant.

```json
{"openapi":"3.0.1","info":{"title":"Customer API","version":"v1"},"tags":[{"name":"orders","description":"Orders"}],"servers":[{"url":"https://api.partssource.com/customer","description":"Production Environment"}],"security":[{"customer-api-authorizer":[],"api-key":[]}],"components":{"securitySchemes":{"customer-api-authorizer":{"type":"apiKey","description":"AWS Cognito JWT token. Include as 'Authorization: Bearer {token}' header.","name":"Authorization","in":"header"}},"schemas":{"OrderSearchResponseApiResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OrderSearchResponse"},"correlationId":{"type":"string","nullable":true},"timestamp":{"type":"string","format":"date-time"}},"additionalProperties":false},"OrderSearchResponse":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOrderSummary"},"nullable":true},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"additionalProperties":false},"CustomerOrderSummary":{"type":"object","properties":{"orderId":{"type":"integer","format":"int64"},"companyId":{"type":"integer","format":"int64"},"requesterId":{"type":"integer","format":"int64"},"poNumber":{"type":"string","nullable":true},"requesterName":{"type":"string","nullable":true},"orderDate":{"type":"string","format":"date-time"},"lastUpdated":{"type":"string","format":"date-time","nullable":true},"total":{"type":"number","format":"double","nullable":true},"shippingMethod":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSearchLineDetail"},"description":"Line items in the canonical customer line-detail schema (AP-21369), schema-identical to\r\nGET /orders/{orderId} (AP-21368) plus this endpoint's original pre-canonical fields as\r\ndeprecated aliases (additive change only — see CustomerApi.Models.Orders.CustomerSearchLineDetail).\r\nPresent only when `include=lineItems` is requested.","nullable":true},"shippingInfo":{"type":"array","items":{"$ref":"#/components/schemas/CustomerShippingInfoSummary"},"nullable":true}},"additionalProperties":false},"CustomerSearchLineDetail":{"type":"object","properties":{"lineItemId":{"type":"integer","format":"int64"},"partNumber":{"type":"string","description":"Sourced/fulfilled part number.","nullable":true},"sourcedPartNumber":{"type":"string","description":"Canonical alias for CustomerApi.Models.Orders.CustomerOrderLineDetail.PartNumber (the sourced part number).","nullable":true},"requestedPartNumber":{"type":"string","description":"Part number originally requested by the customer.","nullable":true},"customerPoNumber":{"type":"string","description":"PO number the customer issued to PartsSource. Absent for punchout orders.","nullable":true},"customerLineKey":{"type":"string","description":"Customer's own line identifier. Absent for punchout orders. Phase 2.","nullable":true},"description":{"type":"string","nullable":true},"quantity":{"type":"integer","format":"int32"},"price":{"type":"number","description":"Line price. Preserves the prior endpoint's meaning (the extended line total).","format":"double"},"psListPrice":{"type":"number","format":"double","nullable":true},"tax":{"type":"number","format":"double","nullable":true},"shipCost":{"type":"number","format":"double","nullable":true},"status":{"type":"string","description":"Composite human-friendly status name.","nullable":true},"statusId":{"type":"integer","format":"int32","nullable":true},"manufacturerId":{"type":"integer","description":"OEM/manufacturer id (SLS_LINE_ITEMS.OEM_ID). Part/depot lines only; absent if not set upstream.","format":"int64","nullable":true},"manufacturer":{"type":"string","description":"OEM/manufacturer name. Part/depot lines only.","nullable":true},"condition":{"type":"string","description":"Part condition (e.g. OEM, Refurbished), sourced from the selected vendor-research row. Part/depot lines only; absent until a vendor is selected.","nullable":true},"uom":{"type":"string","description":"Unit of measure (e.g. EA, BX, KT) — SLS_LINE_ITEMS.UOM_ID via CT.CT_UNITS_OF_MEASURE.","nullable":true},"lineItemType":{"type":"string","description":"Line item type vocabulary (part, depot_flat_rate, depot_quoted, service, talent).\r\nDerived from OrderTypeId + ConditionId, mirroring ps-portal's LineItemContextDataModel\r\nmapping. \"talent\" has no known OrderTypeId mapping today, so it never appears.","nullable":true},"carrier":{"type":"string","description":"Carrier of the shipment. Absent until the line has actually shipped (per the updated\r\nAP-21368 spec); before that, CustomerApi.Models.Orders.CustomerOrderLineDetail.PlannedCarrier carries the instructed carrier.\r\nValue is the shipping document's carrier — see CustomerApi.Models.Orders.CustomerOrderLineDetail.PlannedCarrier for the known\r\n\"actual vs. planned\" source nuance.","nullable":true},"shipMethod":{"type":"string","description":"Ship method of the shipment. Absent until shipped, like CustomerApi.Models.Orders.CustomerOrderLineDetail.Carrier.","nullable":true},"plannedCarrier":{"type":"string","description":"Carrier instructed to the supplier (the shipping document's carrier — the same source\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.Carrier currently uses). A separate, more precisely \"actual\" carrier exists\r\non PARTS.SHP_TRACKING_NUMBERS.SHIP_VIA_ID once a shipment is tracked, but re-pointing\r\nCustomerApi.Models.Orders.CustomerOrderLineDetail.Carrier at it is a behavior change deferred to a future pass.","nullable":true},"plannedShipMethod":{"type":"string","nullable":true},"useShippingAccount":{"type":"boolean","description":"True when SLS_SHIPPING_DOCUMENTS.SHIP_ACCOUNT_ID indicates the customer's own carrier\r\naccount (vs. PartsSource's). Absent when there's no shipping document yet.","nullable":true},"trackingNumber":{"type":"string","description":"Present as soon as a shipping label exists (an active PARTS.SHP_TRACKING_NUMBERS row),\r\nwhich can be before the line ships — per the updated AP-21368 spec.","nullable":true},"shippedAt":{"type":"string","description":"PARTS.SHP_TRACKING_NUMBERS.DATE_SHIPPED. Absent until shipped.","format":"date-time","nullable":true},"deliveredAt":{"type":"string","description":"Absent until delivered.","format":"date-time","nullable":true},"estimatedShipDate":{"type":"string","description":"Current committed ESD (PARTS.ESTIMATED_SHIP_DATE.ESD, active row). Absent if none committed.","format":"date-time","nullable":true},"ifOrderedBy":{"type":"string","description":"No known persisted source for the order-creation-time cutoff. Stays absent (Phase 2).","format":"date-time","nullable":true},"facilityId":{"type":"integer","description":"No known per-line facility concept in this repo — stays absent (Phase 2).","format":"int64","nullable":true},"facilityName":{"type":"string","nullable":true},"requesterId":{"type":"integer","format":"int64","nullable":true},"requester":{"type":"string","nullable":true},"orderedById":{"type":"integer","description":"SLS_ORDERS.CREATED_USER_ID — the person who keyed the order (distinct from the requester).","format":"int64","nullable":true},"orderedBy":{"type":"string","nullable":true},"lineType":{"type":"string","nullable":true},"originatingLineItemId":{"type":"integer","format":"int64","nullable":true},"exceptionReason":{"type":"string","nullable":true},"isCriticalHardDown":{"type":"boolean","description":"True when SLS_LINE_ITEMS.URGENCY_ID = 1 (the repo-wide critical-hard-down convention).","nullable":true},"isExchangeRequired":{"type":"boolean","description":"True when the selected vendor-research row has a non-zero EXCHANGE_COST.","nullable":true},"activeExchangeId":{"type":"integer","format":"int64","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"fees":{"type":"array","items":{"$ref":"#/components/schemas/FeeSummary"},"description":"Non-zero fees applied to the line (PARTS.SLS_PURCHASE_LINES). Absent when there are none.","nullable":true},"activeReturns":{"type":"array","items":{"$ref":"#/components/schemas/ActiveReturnSummary"},"description":"Active (non-terminal) return requests against this line — PARTS.RGA_HEADERS excluding\r\nCANX/CLOSED/VOID statuses, per InternalApi's GetActiveRgasByLineItem.sql rule. Unlike the\r\nother collections this is <strong>always serialized</strong> — an empty array when there\r\nare none (per AP-21368 spec).","nullable":true},"notes":{"type":"array","items":{"$ref":"#/components/schemas/NoteSummary"},"description":"External, web-visible notes (PARTS.SLS_LINE_ITEM_NOTES, WEB_NOTE = 'Y'; internal notes\r\nare never returned). Absent (not empty) when there are none.","nullable":true},"lineId":{"type":"integer","format":"int64","deprecated":true},"replacementPartNumber":{"type":"string","description":"Sourcer-entered override part number from the selected vendor-research row — NOT the\r\nfulfilled part; use `sourcedPartNumber` for that. Retained (always emitted, empty\r\nwhen none, matching the original endpoint) for back-compat only.","nullable":true,"deprecated":true},"poNumber":{"type":"string","description":"Emitted as null when none, matching the original endpoint's behavior.","nullable":true,"deprecated":true},"extendedPrice":{"type":"number","format":"double","deprecated":true},"statusName":{"type":"string","nullable":true,"deprecated":true}},"additionalProperties":false,"description":"Search line item: the canonical CustomerApi.Models.Orders.CustomerOrderLineDetail schema plus the\r\nsearch endpoint's original (pre-AP-21369) field names retained as deprecated aliases, so\r\naligning search with the canonical schema stays additive — nothing existing consumers read\r\nis removed. New consumers should use only the canonical names.\r\n\r\n\r\nTwo pre-canonical fields could not be aliased because their names now belong to the\r\ncanonical schema: `requestedPartNumber` (previously always emitted, possibly empty;\r\nnow absent unless it differs from the sourced part number) and `price` (previously the\r\nper-unit price; now the extended line total, identical to GET /orders/{orderId} — the\r\ncanonical AP-21355 schema has no per-unit price field, so the extended total is also\r\nexposed as the CustomerApi.Models.Orders.CustomerSearchLineDetail.ExtendedPrice alias but the per-unit value is no longer\r\nreturned; flagged in the PR for product sign-off).\r\n"},"FeeSummary":{"type":"object","properties":{"name":{"type":"string","description":"Fee name, e.g. `processingFee`, `manufacturerFee`.","nullable":true},"value":{"type":"number","format":"double"}},"additionalProperties":false,"description":"A single non-zero fee applied to a line item."},"ActiveReturnSummary":{"type":"object","properties":{"returnId":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int32"},"statusName":{"type":"string","nullable":true},"requestedAt":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Summary of an active (non-terminal) return request against a line item."},"NoteSummary":{"type":"object","properties":{"noteId":{"type":"integer","format":"int64"},"note":{"type":"string","nullable":true},"addedBy":{"type":"string","nullable":true},"addedById":{"type":"integer","format":"int64","nullable":true},"addedAt":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false,"description":"An external, web-visible note on a line item."},"CustomerShippingInfoSummary":{"type":"object","properties":{"shippingDocId":{"type":"integer","format":"int64"},"lineItemIds":{"type":"array","items":{"type":"integer","format":"int64"},"nullable":true},"attentionTo":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"carrierName":{"type":"string","nullable":true},"serviceLevel":{"type":"string","nullable":true}},"additionalProperties":false},"PaginationInfo":{"required":["hasMore","limit","offset","total"],"type":"object","properties":{"total":{"maximum":2147483647,"minimum":0,"type":"integer","format":"int32"},"limit":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"},"offset":{"maximum":2147483647,"minimum":0,"type":"integer","format":"int32"},"hasMore":{"type":"boolean"}},"additionalProperties":false},"ApiProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true},"correlationId":{"type":"string","nullable":true},"errors":{"type":"array","items":{"type":"string"},"nullable":true},"timestamp":{"type":"string","format":"date-time"},"service":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/orders/search":{"get":{"tags":["orders"],"summary":"Search orders","description":"Searches orders using structured query syntax, scoped to the authenticated tenant.","operationId":"SearchOrders","parameters":[{"name":"q","in":"query","description":"Optional search query string. When omitted, returns all tenant orders.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum results (default: 50, max: 100).","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32","default":50}},{"name":"offset","in":"query","description":"Number of records to skip (default: 0).","schema":{"maximum":2147483647,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"include","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Search results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderSearchResponseApiResponse"}}}},"400":{"description":"Missing tenant context.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblemDetails"}}}},"502":{"description":"External Orders API unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblemDetails"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.partssource.com/api-customer/preview/orders.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
