My Account (Self-Service)¶
The 11 GetMyAccount* messages power a logged-in customer's account/order-history portal: open orders, invoices, open AR, open quotes, contracts, and purchase history. All 11 share the pagination and sort pattern and the RestrictDataByShopper / WebShopperId / WebShopperEmailAddress fields described once below rather than repeated per operation.
See eCommerce API overview for the shared envelope fields and result codes.
Fields common to (almost) every operation on this page¶
| Field | Notes |
|---|---|
ShipToID | Scope results to one ship-to instead of the whole customer. |
RestrictDataByShopper + WebShopperId / WebShopperEmailAddress | Requires B2BSeller. When RestrictDataByShopper=TRUE, results are filtered to only what the identified web shopper is allowed to see — used when multiple individual logins share one CustomerCode house account and shouldn't see each other's order history. |
IncludePassThroughItems / PassThroughVendorName | Requires B2BSeller — drop-ship / pass-through vendor visibility. |
Date range pairs (Start*Date / End*Date) | Optional filters; omit both ends of a pair to not filter on it. |
Orders¶
GetMyAccountOrders¶
Returns open (or open + completed) orders for the customer.
Request filters: StartOrderNumber/EndOrderNumber, StartPONumber/EndPONumber, StartOrderDate/EndOrderDate, StartWebReferenceNumber/EndWebReferenceNumber (populate both with the same value — P21 doesn't support a true range here), ShipToID, ItemID.
| Field | Notes |
|---|---|
OrderStatus | OPEN (open orders only) or TRACK (open + completed). |
OrderType | merchandise for regular orders, service for service orders. |
ServiceItemID / SerialNumber | Only used when OrderType=service. |
Sort columns: OrderDate, OrderNumber, PONumber, OrderValue.
Reply (ListOfOrders/Order): OrderNumber, PONumber, OrderDate, RequireDate, OrderValue, InvoiceValue, CanceledValue, Approved, NumberOfLines, OrderStatus (OPEN/COMPLETE), PromiseDate, OriginalPromiseDate, ShipToAddress/*, ShipToInstructions1/2, ListOfNotes.
GetMyAccountOrdersDetail¶
Line-item detail for a single order.
| Field | Notes |
|---|---|
OrderNumber | Required. |
GetPickTicketNumbers | TRUE to include pick ticket numbers per line. |
ReturnCancelationInformation | TRUE to get LineCancelable/OrderCancelable flags back — check these before showing a "Cancel" button. |
OrderType, ItemID, OpenQuantityOnly | OpenQuantityOnly presumably filters to lines with remaining open quantity — undocumented in the manual. |
Reply: ApprovedStatus, OrderCancelable, RequiredDate, ShipToAddress/*, ListOfDocumentLinks, ListOfShipments/Shipment/CarrierID,CarrierName,TrackingNumber, and per line (ListOfLineItems/LineItem):
LineItemNumber, ItemID, Description1, CustomerPartNumber, OrderQuantity, UnitName, UnitSize, NetPrice, OpenQuantity, ShipQuantity, BackorderQuantity, OpenValue, LastShippedDate, DispositionDescription, PromiseDate, OriginalPromiseDate, SourceLocation, RequiredDate, Status, ExpectedShipDate, PickedQuantity, FreeQuantity, LeadTimeDays, LineCancelable, ListOfPickTicketNumbers, ListOfDocumentLinks, ListOfReleases/Release/Quantity,ReleaseDate,ExpectedDate,PickDate, Revision/RevisionLevel,BlueprintNumber,EngineeringchangeNumber,EffectiveDate,ExpirationDate, ServiceItemID/SerialNumber (service orders), ListOfNotes.
ListOfReleases vs. ListOfShipments
ListOfReleases (per line) tracks planned/expected release quantities and dates — useful for blanket/scheduled orders. ListOfShipments (order-level) tracks what's actually shipped with carrier/tracking info. Don't conflate the two when building a tracking UI.
Invoices & AR¶
GetMyAccountInvoices¶
Returns invoice headers matching search criteria.
Request filters: StartInvoiceDate/EndInvoiceDate, StartOrderNumber/EndOrderNumber, StartPONumber/EndPONumber, StartInvoiceNumber/EndInvoiceNumber, StartItemCode/EndItemCode, StartClaimNumber/EndClaimNumber, ShipToID, SerialNumber, JobName, LotCd.
| Field | Notes |
|---|---|
ReturnInvoiceHeaderDocumentLinks | TRUE to include ListOfDocumentLinks per invoice (scanned copies, etc.). |
IncludeWarrantyClaims | |
IncludeOtherChargeLineItems |
Sort columns: InvoiceDate, InvoiceNumber, OrderNumber, PONumber, OrderValue.
Reply (ListOfInvoices/Invoice): OrderNumber, PONumber, InvoiceDate, InvoiceNumber, InvoiceValue, ShipToAddress/*, VendorInvoiceNumber, VendorName, OriginalInvoiceNumber, JobName, ListOfDocumentLinks.
GetMyAccountInvoicesDetail¶
Line-item detail for a single invoice.
| Field | Notes |
|---|---|
InvoiceNumber | Required. |
ReturnInvoiceLineLinks / ReturnInvoiceLineLotLinks | TRUE to include per-line and per-lot document links respectively. |
IncludeOtherChargeLineItems, ItemID |
Reply: BillToAddress/*, ShipToAddress/*, InvoiceDate, InvoiceNumber, InvoiceTotalAmount, InvoiceNetDueDate, InvoiceBranchID, OrderNumber, OrderDate, SalesPerson, PONumber, ShipInstructions, FreightDescription, TotalTaxAmount, OtherChargeAmount, Freight, VendorInvoiceNumber, VendorName, ListOfDocumentLinks, ListOfOrderHeaderNote/OrderHeaderNote/Note, ListOfShipments, ListOfTrackingNumbers (deprecated — the manual says use ListOfShipments instead), and per line (ListOfItems/Item):
LineItemNumber, ItemID, Description, QuantityShipped, UnitName, UnitSize, NetPrice, Freight, ExtendedPrice, RMAQtyLimit, NARDANumber, OriginalInvoiceNumber, ListOfSerialNumber, Revision/*, UpdatedItemID, UpdatedPartType, ListOfDocumentLinks, ListOfInvoiceDocumentLinks, ListOfLotDocumentLinks, ListOfOrderLineNote/OrderLineNote/Note.
RMAQtyLimit gates return eligibility
If you're building a "return this item" flow from invoice history, RMAQtyLimit is the field to check — it's the maximum quantity from this line still eligible for RMA, not the original shipped quantity.
GetMyAccountOpenAR¶
Returns open AR (unpaid invoice balances), plus an aging summary.
Request filters: StartInvoiceNumber/EndInvoiceNumber, StartInvoiceDate/EndInvoiceDate, ShipToID.
| Field | Notes |
|---|---|
AgingBasis | 1 = age by due date (invoice_hdr.net_due_date); 0 = age by invoice date (invoice_hdr.invoice_date); blank = use the P21 system setting "Default Aging Basis." |
GetCreditInvoices | TRUE to include credit invoices in the results; FALSE excludes them. |
Sort columns: InvoiceNumber, OpenInvoiceDate, ARDueDate, ARAmountOpen.
Reply (ListOfOpenAR/OpenAR): InvoiceNumber, OpenInvoiceDate, ARDescription, ARDiscountDate (the terms-discount due date, from invoice_hdr.terms_due_date), ARDueDate, ARAmountTotalSales, ARAmountOpen, PONumber, ShipToAddress/*.
Reply — AgedAR (one summary block, not per-invoice): CurrentAmount, Age1Amount, Age1ToAge2Amount, Age2ToAge3Amount, OverAge3Amount, TotalARAmountOpen. The age bucket boundaries themselves aren't in the response — they're a P21 system configuration (aging periods), so if you need to label the buckets ("0-30", "31-60", etc.) in your UI, source those labels from P21 config rather than assuming a fixed scheme.
Quotes & Contracts¶
GetMyAccountOpenQuotes¶
Returns open quotes.
Request filters: StartQuoteDate/EndQuoteDate, StartQuoteNumber/EndQuoteNumber, StartPONumber/EndPONumber, ShipToID, ItemID, ServiceItemID, SerialNumber.
| Field | Notes |
|---|---|
QuoteType | merchandise or (presumably, mirroring orders) service. |
QuoteStatus | e.g. APPROVED — filter by quote approval state. |
IncludeExpiredQuotes | FALSE to exclude expired quotes from results. |
Reply (ListOfOpenQuotes/OpenQuote): OrderNumber (the quote is stored as an order record with quote status), PONumber, OrderDate, RequireDate, ExpireDate, QuoteValue, QuoteStatus.
GetMyAccountOpenQuotesDetail¶
Line-item detail for a single quote.
| Field | Notes |
|---|---|
QuoteNumber | Required. |
Reply: ListOfDocumentLinks, ShipToID, and per line (ListOfLineItems/LineItem):
ItemID, Description1, Description2, OrderQuantity, UnitName, UnitSize, UnitPrice, PriceUnitName, PriceUnitSize, NetPrice, DeliveryTime, QuoteLineNumber, OpenQuantity, Completed, Revision/*, ListOfDocumentLinks.
GetMyAccountContracts¶
Returns the customer's active contracts.
Request filters: StartItemID/EndItemID, StartContractID/EndContractID, StartCustomerPartNumber/EndCustomerPartNumber, ShipToID.
Reply (ListOfContracts/Contract): ContractID, PONumber, ExpirationDate, ContractUID (the internal key you'll pass to GetItemPrice's ContractUID field for contract pricing), ContractDescription.
GetMyAccountContractDetails¶
Line-item detail for a single contract — the items on it, contract pricing, and bin/delivery info.
| Field | Notes |
|---|---|
ContractID | Required. |
SourceLocation | Undocumented in the manual — likely scopes/derives pricing to a location. |
ContractSearchColumn / ContractSearchText | Undocumented — free-text filter against a specified column within the contract's line items. |
Reply (ListOfContractItems/ContractItem): ContractUID, ContractLineNumber, ItemID, CustomerPartNumber, UnitName, UnitSize, NetPrice, Description, ExtendedDescription, LineNumber, Revision/*, BinInformation/BinID,LineID,LineFeed,LineStation,ReorderQuantity,MinimumQuantity, ListOfDeliveryPoints/DeliveryPoint, CustomerShipTo/* (a full ship-to block, per contract line — a contract line can pin a specific delivery address).
Purchase History¶
GetMyAccountPurchaseHistory¶
Returns aggregated purchase history per item — total quantity/amount purchased, not individual transactions. Use this for a "buy it again" item list.
Request filters: StartItemID/EndItemID, StartVendorID/EndVendorID, StartCustomerPartNumber/EndCustomerPartNumber, StartInvoiceNumber/EndInvoiceNumber, StartPONumber/EndPONumber, StartInvoiceDate/EndInvoiceDate, ListOfCategoryIDs/CategoryID (filter by category.category_id), ShipToID.
Sort columns: ItemID, LastInvoiceDate, TotalExtendedPrice.
Reply (ListOfPurchaseHistorys/PurchaseHistory): ItemID, Description, LastInvoiceDate, TotalInvoiceLines, TotalExtendedPrice, CustomerPartNumber, TotalInvoiceQuantity.
GetMyAccountPastPurchaseDetail¶
Returns the individual invoice-line transactions for a single item — the drill-down from GetMyAccountPurchaseHistory's aggregate row.
| Field | Notes |
|---|---|
ItemID | Required — this is scoped to one item, unlike the aggregate call above. |
StartInvoiceDate/EndInvoiceDate | |
ShipToID |
Reply (ListOfPastPurchases/PastPurchase): OrderNumber, InvoiceNumber, PONumber, LineNumber, InvoiceDate, InvoiceQuantity, UnitName, UnitSize, UnitPrice, NetPrice (deprecated — the manual notes it duplicates ExtendedPrice, don't rely on it meaning per-unit), ExtendedPrice, ConsolidatedInvoice, ShipToAddress/*.
Pairing the two purchase-history calls
GetMyAccountPurchaseHistory is the summary/list view; GetMyAccountPastPurchaseDetail is what you call when the shopper clicks into one item from that list. Don't call PastPurchaseDetail in a loop over every item in the summary — it's a per-item, potentially many-rows-per-item query, and doing that N times to render one summary page defeats the purpose of the aggregate call.