{"openapi":"3.1.0","info":{"title":"KSS API","version":"v1","description":"Programmatic access to KSS product catalog, inventory, customer, invoice, payment, and purchase data."},"servers":[{"url":"https://api.kssdata.com/api/v1","description":"Production"},{"url":"https://api.test.kssdata.com/api/v1","description":"Test"}],"tags":[{"name":"Allocations"},{"name":"AR Aging"},{"name":"Pricing"},{"name":"Customers"},{"name":"Inventory"},{"name":"Invoices"},{"name":"Locations"},{"name":"Promotions"},{"name":"Products"},{"name":"States"},{"name":"Suppliers"},{"name":"Users"},{"name":"Payments"},{"name":"Vendors"},{"name":"Purchases"},{"name":"Purchase Transactions"},{"name":"Sales Reps"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ApiError":{"type":"object","required":["code","detail"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"detail":{"type":"string","description":"Human-readable explanation of the error."},"fieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}}},"additionalProperties":true},"FieldError":{"type":"object","required":["field","code","detail"],"properties":{"field":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"},"message":{"type":"string"},"index":{"type":"number"},"ProductID":{"type":"number"}},"additionalProperties":true},"ErrorEnvelope":{"type":"object","required":["Error"],"properties":{"Error":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ApiError"}]}}},"PaginationEnvelope":{"type":"object","required":["Data","Page","PageSize","HasNextPage"],"properties":{"Data":{"description":"Response payload."},"Page":{"type":"number","minimum":1},"PageSize":{"type":"number","minimum":1,"maximum":500},"HasNextPage":{"type":"boolean"}}},"Purchase":{"type":"object","required":["PurchaseID","ReceiveDate","ShipmentNum","ShipmentID","ToLocationID","ToLocationName","VendorName","VendorID","PostDate","Status","PONum","Freight","Tax","OtherCost","Total","TotalCases","PublicPDFLink","PurchasePDFURLAPIKeyID","Memo","LastEditTime","LastCalcTime","TimeUpdated","InvoiceDate","DueDate","Terms","TermID","TimeCreated","PurchaseGlobalID","ReceivingNum"],"properties":{"PurchaseID":{"type":"number","description":"Numeric ERP purchase ID."},"ReceiveDate":{"type":["string","null"],"format":"date-time"},"ShipmentNum":{"type":["string","null"]},"ShipmentID":{"type":["number","null"]},"ToLocationID":{"type":"number"},"ToLocationName":{"type":["string","null"]},"VendorName":{"type":["string","null"]},"VendorID":{"type":"number"},"PostDate":{"type":["string","null"],"format":"date-time"},"Status":{"type":"string","enum":["New","Accepted","Received","Confirmed","Verified","InProgress","Submitted"]},"PONum":{"type":"string"},"Freight":{"type":["string","null"],"description":"Decimal value serialized as a string."},"Tax":{"type":["string","null"],"description":"Decimal value serialized as a string."},"OtherCost":{"type":["string","null"],"description":"Decimal value serialized as a string."},"Total":{"type":["string","null"],"description":"Decimal value serialized as a string."},"TotalCases":{"type":["string","null"],"description":"Total case count serialized as a string."},"PublicPDFLink":{"type":["string","null"]},"PurchasePDFURLAPIKeyID":{"type":["number","null"]},"Memo":{"type":["string","null"]},"LastEditTime":{"type":["string","null"],"format":"date-time"},"LastCalcTime":{"type":["string","null"],"format":"date-time"},"TimeUpdated":{"type":["string","null"],"format":"date-time"},"InvoiceDate":{"type":["string","null"],"format":"date-time"},"DueDate":{"type":["string","null"],"format":"date-time"},"Terms":{"type":["string","null"]},"TermID":{"type":["number","null"]},"TimeCreated":{"type":["string","null"],"format":"date-time"},"PurchaseGlobalID":{"type":["string","null"],"description":"Permanent global purchase identifier."},"ReceivingNum":{"type":["string","null"]}},"additionalProperties":false,"example":{"PurchaseID":70001,"ReceiveDate":"2026-06-02T06:00:00.000Z","ShipmentNum":"Example PO 70001","ShipmentID":72001,"ToLocationID":40001,"ToLocationName":"Alameda","VendorName":"EXAMPLE DISTRIBUTORS LLC (Example Location)","VendorID":50001,"PostDate":"2026-06-02T06:00:00.000Z","Status":"Verified","PONum":"Example PO 70001","Freight":"0.00","Tax":"0.00","OtherCost":"0.00","Total":"35726.38","TotalCases":"184.00","PublicPDFLink":null,"PurchasePDFURLAPIKeyID":94001,"Memo":null,"LastEditTime":null,"LastCalcTime":"2026-06-04T10:20:14.000Z","TimeUpdated":"2026-08-21T18:06:57.930Z","InvoiceDate":"2026-06-01T06:00:00.000Z","DueDate":"2026-08-30T06:00:00.000Z","Terms":"Driver Accounts","TermID":80002,"TimeCreated":"2026-06-15T22:09:09.921Z","PurchaseGlobalID":"00000AAAAAFFFFF00000AAAAAF","ReceivingNum":null}},"PurchaseResponse":{"type":"object","required":["Data"],"properties":{"Data":{"$ref":"#/components/schemas/Purchase"}}},"PaginatedPurchaseResponse":{"allOf":[{"$ref":"#/components/schemas/PaginationEnvelope"},{"type":"object","properties":{"Data":{"type":"array","items":{"$ref":"#/components/schemas/Purchase"}}}}]},"PurchaseDraftTransaction":{"type":"object","required":["ProductID","NumUnits"],"properties":{"ID":{"type":"number"},"ProductID":{"type":"number"},"NumUnits":{"type":"number"},"BatchCode":{"type":["string","null"]},"ExpirationDate":{"type":["string","null"],"format":"date"},"NeedsActivation":{"type":"boolean"},"ActivationTaskID":{"type":["number","null"]}},"additionalProperties":false},"PurchaseTransaction":{"type":"object","properties":{"PurchaseTransID":{"type":"number"},"PurchaseID":{"type":"number"},"ProductID":{"type":"number"},"Ordered":{"type":["string","null"],"description":"Decimal value serialized as a string."},"NumUnits":{"type":["string","null"],"description":"Decimal value serialized as a string."},"FOB":{"type":["string","null"],"description":"Decimal value serialized as a string."},"DepositCost":{"type":["string","null"],"description":"Decimal value serialized as a string."},"ExtPrice":{"type":["string","null"],"description":"Decimal value serialized as a string."},"ExpirationDate":{"type":["string","null"],"format":"date-time"},"CodeDate":{"type":["string","null"],"format":"date-time"},"BatchCode":{"type":["string","null"]},"LaidInCost":{"type":["string","null"],"description":"Decimal value serialized as a string."},"PalletTag":{"type":["string","null"]},"Cases":{"type":["string","null"],"description":"Decimal value serialized as a string."},"Weight":{"type":["string","null"],"description":"Decimal value serialized as a string."},"TimeUpdated":{"type":["string","null"],"format":"date-time"}},"additionalProperties":false},"PaginatedPurchaseTransactionResponse":{"allOf":[{"$ref":"#/components/schemas/PaginationEnvelope"},{"type":"object","properties":{"Data":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseTransaction"}}}}]},"PurchaseWriteTransaction":{"type":"object","required":["ProductID"],"properties":{"ProductID":{"type":"number","description":"Product to add to the purchase."},"Cases":{"type":"number","description":"Case quantity. Send exactly one of Cases or Units."},"Units":{"type":"number","description":"Unit quantity. Send exactly one of Cases or Units."},"BatchCode":{"type":"string","description":"Batch code. Required when the vendor requires batch codes."},"ExpirationDate":{"type":"string","format":"date","description":"Expiration date as YYYY-MM-DD."}},"additionalProperties":false},"CreatePurchaseRequest":{"type":"object","required":["VendorID","ToLocationID","SupplierID","DeliveryDate","PONum"],"properties":{"VendorID":{"type":"number","description":"The vendor the purchase order is placed with."},"ToLocationID":{"type":"number","description":"The location receiving the purchase."},"SupplierID":{"type":"number","description":"The supplier the purchase is for. Must be one of your authorized suppliers."},"SupplierName":{"type":"string","description":"Supplier name used in the purchase memo. Falls back to the vendor's name when omitted."},"DeliveryDate":{"type":"string","format":"date","description":"Requested delivery date as YYYY-MM-DD."},"PONum":{"type":"string","description":"Your purchase order number. Must be unique for the vendor."},"PurchaseTransactions":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseWriteTransaction"},"maxItems":200},"CreatedByUserID":{"type":"number","description":"Honored for Employee keys only; other keys use the key's own user."},"submit":{"type":"boolean","default":false}},"additionalProperties":false},"UpdatePurchaseRequest":{"type":"object","properties":{"VendorID":{"type":"number","description":"The vendor the purchase order is placed with."},"ToLocationID":{"type":"number","description":"The location receiving the purchase."},"DeliveryDate":{"type":"string","format":"date","description":"Requested delivery date as YYYY-MM-DD."},"PONum":{"type":"string","description":"Your purchase order number. Must remain unique for the vendor."},"PurchaseTransactions":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseWriteTransaction"},"maxItems":200,"description":"When present, replaces all line items on the draft purchase."}},"additionalProperties":false},"PurchaseValidationResponse":{"type":"object","required":["Data"],"properties":{"Data":{"type":"object","required":["Valid","TotalCases"],"properties":{"Valid":{"type":"boolean"},"TotalCases":{"type":"number"}}}}}},"parameters":{"Page":{"name":"Page","in":"query","required":false,"description":"Page number to retrieve. Defaults to 1.","schema":{"type":"number","minimum":1,"default":1}},"PageSize":{"name":"PageSize","in":"query","required":false,"description":"Number of rows to return per page. Defaults to 50; maximum is 500.","schema":{"type":"number","minimum":1,"maximum":500,"default":50}},"States":{"name":"States","in":"query","required":false,"description":"Comma-separated list of state abbreviations to filter by. Example: \"CA,NJ\".","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"CA,NJ"},"example":"CA,NJ"},"CustomerIDs":{"name":"CustomerIDs","in":"query","required":false,"description":"Comma-separated list of customer IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},"SupplierIDs":{"name":"SupplierIDs","in":"query","required":false,"description":"Comma-separated list of supplier IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},"ProductIDs":{"name":"ProductIDs","in":"query","required":false,"description":"Comma-separated list of product IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},"LocationIDs":{"name":"LocationIDs","in":"query","required":false,"description":"Comma-separated list of location IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional for POST and PATCH requests. Send a unique key for each logical mutation so an exact retry can replay the original response instead of running the operation again.","schema":{"type":"string"}},"Prefer":{"name":"Prefer","in":"header","required":false,"description":"Use return=minimal to omit the response body; return=representation is the default. Use handling=lenient to ignore unrecognized fields where supported.","schema":{"type":"string"}}},"responses":{"BadRequest":{"description":"The request is missing required input or contains invalid input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unauthorized":{"description":"The request is missing a valid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Forbidden":{"description":"The API key is not authorized to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Conflict":{"description":"The request conflicts with the current state of the resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"UnprocessableEntity":{"description":"The request is well-formed but could not be accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"PayloadTooLarge":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"UnsupportedMediaType":{"description":"The request content type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"TooManyRequests":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"ServerError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/allocations":{"get":{"tags":["Allocations"],"operationId":"getAllocations","description":"Returns product allocations filtered by customer, supplier, and state.","parameters":[{"$ref":"#/components/parameters/CustomerIDs"},{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"AllocationID":85001,"ProductID":30001,"CustomerID":10001,"Units":24,"AllocationTypeID":0,"StartDate":"2025-01-01","EndDate":"2025-03-31","TimeUpdated":"2025-01-15T10:00:00.000Z"},{"AllocationID":85002,"ProductID":30002,"CustomerID":10001,"Units":48,"AllocationTypeID":0,"StartDate":"2025-01-01","EndDate":"2025-03-31","TimeUpdated":"2025-01-15T10:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"A single Allocation ID can effect multiple customers. The Unique key is [Allocation, ProductID, CustomerID]","summary":"Returns product allocations filtered by customer, supplier, and state."}},"/arAging":{"get":{"tags":["AR Aging"],"operationId":"getARAging","description":"Returns accounts receivable aging records broken out by AR account and supplier.","parameters":[{"$ref":"#/components/parameters/CustomerIDs"},{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"ARAccountID":81001,"SupplierID":20002,"OpenCredit":"-31.050000","CurrentDue":"0.000000","Due_1_30":"34635.280000","Due_31_60":"0.000000","Due_61_90":"0.000000","Due_91":"0.000000","CloseDate":"2026-01-25T07:00:00.000Z","TotalBalanceOutstanding":"34635.280000","CurrentInvoices":[],"Invoices_1_30":[{"InvoiceID":60003,"InvoiceNum":"X-00001","OpenBalance":"11545.090000"},{"InvoiceID":60004,"InvoiceNum":"X-00002","OpenBalance":"11545.090000"},{"InvoiceID":60005,"InvoiceNum":"X-00003","OpenBalance":"11545.100000"}],"Invoices_31_60":[],"Invoices_61_90":[],"Invoices_91":[],"TimeUpdated":"2024-09-23T19:05:39.984Z","CreditInvoices":[]}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"AR Aging is recalculated once per day at the end of the day","summary":"Returns accounts receivable aging records broken out by AR account and supplier."}},"/customerPricing":{"get":{"tags":["Pricing"],"operationId":"getCustomerPricing","description":"Returns per-customer product pricing including any applicable promotions and discounts for a given effective date.","parameters":[{"$ref":"#/components/parameters/CustomerIDs"},{"name":"EffectiveDate","in":"query","required":false,"description":"ISO 8601 date string to evaluate promotion validity against. Defaults to the current date.","schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"ProductID":30001,"CustomerID":10001,"FullPrice":"18.00","UnitPrice":"15.50","Discount":"2.50","PromotionID":83001,"StartDate":"2025-01-01","EndDate":"2025-03-31","TimeUpdated":"2025-01-10T08:00:00.000Z"},{"ProductID":30002,"CustomerID":10001,"FullPrice":"18.00","UnitPrice":"18.00","Discount":"0.00","PromotionID":null,"StartDate":null,"EndDate":null,"TimeUpdated":"2025-01-10T08:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns per-customer product pricing including any applicable promotions and discounts ..."}},"/customers":{"get":{"tags":["Customers"],"operationId":"getCustomersCustomers","description":"Returns a list of customers filtered by state, customer ID, and account status.","parameters":[{"$ref":"#/components/parameters/CustomerIDs"},{"$ref":"#/components/parameters/States"},{"name":"AccountStatuses","in":"query","required":false,"description":"Comma-separated list of account statuses to filter by. Defaults to Active.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"Verified,Received"},"example":"Verified,Received"},{"name":"OnHold","in":"query","required":false,"description":"Filter by on hold status. Pass \"true\" to return only customers on hold, \"false\" to exclude them. When omitted, on hold status is not filtered.","schema":{"type":"string","enum":["true","false"]}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"CustomerID":10001,"CustomerName":"Kettles Secret Stash","CustomerNameAlt":"Kettles","ChainName":"Kettles Chain","LicenseNum":"C10-0000001-LIC","Address":"123 Main St, Los Angeles, CA 90001","LocationID":40002,"OnHold":false,"SalesRepEmail":"jane.smith@example.com","SalesRepName":"Jane Smith","SalesRepPhone":"555-555-0100","SalesRepUserID":92001,"ProfilePictureURL":"https://cdn.example.com/ExampleBrand/S3UserAvatar/example.jpg","CollectionAgentFullName":null,"CollectionAgentEmail":null,"State":"CA","DeliveryDays":"1","NextDeliveryDates":"2026-01-05;2026-01-12;2026-01-19;2026-01-26","AccountStatus":"Active","DeliveryDates":["2026-01-05","2026-01-12","2026-01-19","2026-01-26"],"DeliveryMinimum":500,"TimeUpdated":"2025-01-15T10:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns a list of customers filtered by state, customer ID, and account status."}},"/customers/creditTerms":{"get":{"tags":["Customers"],"operationId":"getCustomerCreditTerms","description":"Returns the credit terms negotiated between each customer and supplier pair.","parameters":[{"$ref":"#/components/parameters/CustomerIDs"},{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"CustomerID":10001,"SupplierID":20001,"TermID":80001,"Term":"Net 30","TimeUpdated":"2025-01-15T10:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"Customer keys only see rows for their authorized customers. Supplier keys only see rows for their authorized suppliers.","summary":"Returns the credit terms negotiated between each customer and supplier pair."}},"/customers/{customerID}":{"get":{"tags":["Customers"],"operationId":"getCustomersCustomersCustomerID","description":"Returns a single customer by ID.","parameters":[{"name":"customerID","in":"path","required":true,"description":"The ID of the customer to retrieve.","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"CustomerID":10001,"CustomerName":"Kettles Secret Stash","CustomerNameAlt":"Kettles","ChainName":"Kettles Chain","LicenseNum":"C10-0000001-LIC","Address":"123 Main St, Los Angeles, CA 90001","LocationID":40002,"OnHold":false,"SalesRepEmail":"jane.smith@example.com","SalesRepName":"Jane Smith","SalesRepPhone":"555-555-0100","SalesRepUserID":92001,"ProfilePictureURL":"https://cdn.example.com/ExampleBrand/S3UserAvatar/example.jpg","CollectionAgentFullName":null,"CollectionAgentEmail":null,"State":"CA","DeliveryDays":"1","NextDeliveryDates":"2026-01-05;2026-01-12;2026-01-19;2026-01-26","AccountStatus":"Active","DeliveryDates":["2026-01-05","2026-01-12","2026-01-19","2026-01-26"],"DeliveryMinimum":500,"TimeUpdated":"2025-01-15T10:00:00.000Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":false,"summary":"Returns a single customer by ID."}},"/deliveryDays":{"get":{"tags":["Customers"],"operationId":"getDeliveryDays","description":"Returns delivery day schedules for active customers.","parameters":[{"$ref":"#/components/parameters/CustomerIDs"},{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"CustomerID":10001,"DeliveryDays":"3","DeliveryDates":["2026-02-04","2026-02-11","2026-02-18","2026-02-25"]}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"'DeliveryDays' is the day of the week the customer is delivered on. 1 = Monday, 7 = Sunday","summary":"Returns delivery day schedules for active customers."}},"/inventory":{"get":{"tags":["Inventory"],"operationId":"getInventory","description":"Returns warehouse inventory records filtered by supplier, product, location, and state. AvailableUnits = OnFloorInventory - PreSales - Allocations","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/ProductIDs"},{"$ref":"#/components/parameters/LocationIDs"},{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"LocationID":40001,"ProductID":30006,"OnFloorInventory":"1239.00","PreSales":"110.00","Allocated":"0.00","NotAuthorized":false,"AvailableUnits":1129,"PurchaseTransID":71002,"DOI":"5.60","AvgDailySales90d":"201.49","Inventory":"1239.00","Received":"1500.00","Loaded":"0.00","Picked":"0.00","Delivered":"261.00","Unsellable":"0.00","TimeUpdated":"2026-02-24T17:06:10.610Z"},{"LocationID":40001,"ProductID":30007,"OnFloorInventory":"1939.00","PreSales":"180.00","Allocated":"0.00","NotAuthorized":false,"AvailableUnits":1759,"PurchaseTransID":71003,"DOI":"3.77","AvgDailySales90d":"466.83","Inventory":"1939.00","Received":"2100.00","Loaded":"0.00","Picked":"0.00","Delivered":"161.00","Unsellable":"0.00","TimeUpdated":"2026-02-24T17:06:10.610Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":true},"x-kss-pagination":true,"x-kss-callout":"Use Inventory + Received for the full total of what is in the warehouse. The NotAuthorized field signifies that all of this product is reserved for specific accounts. Refer to the Allocations endpoint for details","x-kss-fieldDefinitions":[{"name":"Inventory","description":"Verified received purchases minus verified sales. This can be negative if received purchases are not yet verified. Purchases and Sales are verified at the end of the day."},{"name":"Loaded","description":"Total inventory that has been loaded onto trucks for delivery."},{"name":"Picked","description":"Total inventory that has been picked, but not yet Loaded."},{"name":"Delivered","description":"Total inventory that has been delivered, but is still on Load Sheets in the Loaded Status."},{"name":"Unsellable","description":"Total inventory in the warehouse that is not flagged as sellable."},{"name":"OnFloorInventory","description":"Total sellable inventory in the warehouse. Inventory + Received - (Loaded + Picked + Pending Sales + Delivered + Unsellable)."},{"name":"PreSales","description":"Total inventory that is on an invoice for delivery and not yet picked or loaded."},{"name":"PendingSales","description":"Inventory that has been delivered but not yet verified"},{"name":"Allocated","description":"Inventory that has been specifically \"set aside\" using allocations, and is therefore not universally available."},{"name":"AvailableUnits","description":"Total inventory available for any retailer to buy: OnFloorInventory - (Pre-Sales + Allocated)."},{"name":"Received","description":"Total inventory that has been received and not yet put in on floor or unsellable. This value is not included in the Inventory field."},{"name":"NotAuthorized","description":"If true this product is not generally available. Only specifically authorized accounts can purchase this product."},{"name":"PurchaseTransID","description":"The Purchase Transaction ID of the current FIFO layer that is being sold. The inventory values can be the sum of multiple purchase transactions. Not just the one that is being sold."}],"summary":"Returns warehouse inventory records filtered by supplier, product, location, and state."}},"/inventory/batches":{"get":{"tags":["Inventory"],"operationId":"getInventoryBatches","description":"Returns warehouse inventory broken out by batch, including batch codes, potency, and compliance dates. Filtered by supplier, product, location, state, and batch code.","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/ProductIDs"},{"$ref":"#/components/parameters/LocationIDs"},{"$ref":"#/components/parameters/States"},{"name":"BatchCodes","in":"query","required":false,"description":"Comma-separated list of batch codes to filter by. Matches exactly.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"value1,value2"},"example":"value1,value2"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"LocationID":40001,"ProductID":30006,"SupplierID":20001,"State":"CA","InventoryUnits":1239,"PurchaseTransID":71002,"ExpirationDate":"2026-12-31","COAURL":"https://cdn.example.com/ExampleBrand/COA/example-coa-1.pdf","BatchCode":"EXAMPLE-240115-A","Vintage":null,"UID":"1A4060300012345000000001","Laboratory":"SC Labs","BestByDate":"2026-11-30","HarvestDate":null,"ManufactureDate":"2024-01-15","PackDate":"2024-01-16","COAExpirationDate":"2026-01-15","PotencyType":"PerServing","THCPotency":"5.00","CBDPotency":"0.00","TotalCannabinoids":"5.00","LabelTHCPotency":"5.00","LabelCBDPotency":"0.00","LabelTotalCannabinoids":"5.00","TimeCreated":"2024-01-16T08:00:00.000Z","TimeUpdated":"2026-02-24T17:06:10.610Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":true},"x-kss-pagination":true,"summary":"Returns warehouse inventory broken out by batch, including batch codes, potency, and co..."}},"/invoices":{"get":{"tags":["Invoices"],"operationId":"getInvoicesInvoices","description":"Returns invoices filtered by customer, status, date range, and state.","parameters":[{"$ref":"#/components/parameters/CustomerIDs"},{"name":"InvoiceIDs","in":"query","required":false,"description":"Comma-separated list of invoice IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/States"},{"name":"Statuses","in":"query","required":false,"description":"Comma-separated list of invoice status IDs. Defaults to New (1).","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"Verified,Received"},"example":"Verified,Received"},{"name":"StartDate","in":"query","required":false,"description":"ISO 8601 date string. Returns invoices on or after this date.","schema":{"type":"string","format":"date"}},{"name":"EndDate","in":"query","required":false,"description":"ISO 8601 date string. Returns invoices on or before this date.","schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"InvoiceID":60001,"CustomerID":10001,"CustomerName":"Acme Beverages","InvoiceNum":"INV-2025-0001","OpenDebit":"0.320000","OpenCredit":"0.000000","PONum":null,"PODate":null,"TermID":80001,"PDFURL":"https://example.com/api?APIKeyID=94001","Memo":"This is a memo","Date":"2026-02-10T07:00:00.000Z","DueDate":"2026-03-11T06:00:00.000Z","Status":1,"InvoiceTotal":"1536.000000","SubmittedByUserID":93001,"SubmittedByUserName":"John Doe","SubmittedByUserEmail":"john.doe@example.com","BuiltByUserID":93001,"BuiltByUserName":"Jane Smith","BuiltByUserEmail":"jane.smith@example.com","InvoiceTimeCreated":"2026-01-27T13:40:00.000Z","InvoiceLastUpdated":"2026-01-27T13:40:00.000Z","ARNote":null,"TotalNumUnits":"72","TotalCases":"6.00","TotalFullPrice":"1680.000000","TotalExtPrice":"1536.000000","TotalDiscount":"144.000000","OpenBalance":"1536.000000"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"Defaults to returning only New (1) status invoices if the 'Statuses' parameter is not included","summary":"Returns invoices filtered by customer, status, date range, and state."}},"/invoices/{invoiceID}":{"get":{"tags":["Invoices"],"operationId":"getInvoicesInvoicesInvoiceID","description":"Returns a single invoice by ID.","parameters":[{"name":"invoiceID","in":"path","required":true,"description":"The ID of the invoice to retrieve.","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"InvoiceID":60001,"CustomerID":10001,"CustomerName":"Acme Beverages","InvoiceNum":"INV-2025-0001","OpenDebit":"0.320000","OpenCredit":"0.000000","PONum":null,"PODate":null,"TermID":80001,"PDFURL":"https://example.com/api?APIKeyID=94001","Memo":"This is a memo","Date":"2026-02-10T07:00:00.000Z","DueDate":"2026-03-11T06:00:00.000Z","Status":1,"InvoiceTotal":"1536.000000","SubmittedByUserID":93001,"SubmittedByUserName":"John Doe","SubmittedByUserEmail":"john.doe@example.com","BuiltByUserID":93001,"BuiltByUserName":"Jane Smith","BuiltByUserEmail":"jane.smith@example.com","InvoiceTimeCreated":"2026-01-27T13:40:00.000Z","InvoiceLastUpdated":"2026-01-27T13:40:00.000Z","TotalNumUnits":"72","TotalCases":"6.00","TotalFullPrice":"1680.000000","TotalExtPrice":"1536.000000","TotalDiscount":"144.000000","OpenBalance":"1536.000000"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":false,"summary":"Returns a single invoice by ID."}},"/invoiceTransactions":{"get":{"tags":["Invoices"],"operationId":"getInvoiceTransactionsInvoiceTransactions","description":"Returns line item transactions for the specified invoices. InvoiceIDs is required. Reason and ReasonID identify the adjustment reason recorded against a line item, and are null on lines with no reason.","parameters":[{"name":"InvoiceIDs","in":"query","required":true,"description":"Comma-separated list of invoice IDs to fetch transactions for. Returns 400 if not provided.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"name":"Statuses","in":"query","required":false,"description":"Comma-separated list of invoice status IDs. If provided and does not include Verified (7), verified invoices are excluded from results.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"Verified,Received"},"example":"Verified,Received"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"InvoiceTransID":61001,"InvoiceID":60001,"CustomerID":10001,"ProductID":30004,"ProductName":"Example Bites Milk Chocolate Blueberries","Cases":"1.00","NumUnits":20,"Ordered":20,"BackOrder":0,"FullPrice":"11.000000","Discount":"2.250000","UnitPrice":"8.750000","ExtPrice":"175.000000","TimeUpdated":"2024-09-23T19:05:39.984Z","SupplierID":20001,"PromotionID":83002,"ReasonID":null,"Reason":null,"BatchCode":"BATCH-2025-01","COA_URL":"https://cdn.example.com/coa/batch-2025-001.pdf"},{"InvoiceTransID":61002,"InvoiceID":60001,"ProductID":30005,"ProductName":"Example Gummies Wild Cherry","Cases":"1.00","NumUnits":20,"Ordered":20,"BackOrder":0,"FullPrice":"11.000000","Discount":"0.000000","UnitPrice":"11.000000","ExtPrice":"220.000000","TimeUpdated":"2024-09-23T19:05:39.984Z","SupplierID":20001,"PromotionID":null,"ReasonID":4,"Reason":"Damaged","BatchCode":"BATCH-2025-002","COA_URL":null}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns line item transactions for the specified invoices."}},"/invoiceTransactions/{invoiceID}":{"get":{"tags":["Invoices"],"operationId":"getInvoiceTransactionsInvoiceTransactionsInvoiceID","description":"Returns line item transactions for a single invoice by ID. Reason and ReasonID identify the adjustment reason recorded against a line item, and are null on lines with no reason.","parameters":[{"name":"invoiceID","in":"path","required":true,"description":"The ID of the invoice to fetch transactions for.","schema":{"type":"number"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"InvoiceTransID":61001,"InvoiceID":60001,"CustomerID":10001,"ProductID":30004,"ProductName":"Example Bites Milk Chocolate Blueberries","Cases":"1.00","NumUnits":20,"Ordered":20,"BackOrder":0,"FullPrice":"11.000000","Discount":"2.250000","UnitPrice":"8.750000","ExtPrice":"175.000000","TimeUpdated":"2024-09-23T19:05:39.984Z","SupplierID":20001,"PromotionID":83002,"ReasonID":null,"Reason":null,"BatchCode":"BATCH-2025-01","COA_URL":"https://cdn.example.com/coa/batch-2025-001.pdf"},{"InvoiceTransID":61002,"InvoiceID":60001,"ProductID":30005,"ProductName":"Example Gummies Wild Cherry","Cases":"1.00","NumUnits":20,"Ordered":20,"BackOrder":0,"FullPrice":"11.000000","Discount":"0.000000","UnitPrice":"11.000000","ExtPrice":"220.000000","TimeUpdated":"2024-09-23T19:05:39.984Z","SupplierID":20001,"PromotionID":null,"ReasonID":4,"Reason":"Damaged","BatchCode":"BATCH-2025-002","COA_URL":null}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns line item transactions for a single invoice by ID."}},"/invoices/creditTerms":{"get":{"tags":["Invoices"],"operationId":"getCreditTerms","description":"Returns the catalog of credit terms (Net 30, Net 60, etc.) used on invoices.","parameters":[{"name":"TermIDs","in":"query","required":false,"description":"Comma-separated list of term IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"TermID":80001,"Term":"Net 30","DaysOfCredit":30,"AccountOnHold":false,"TimeUpdated":"2025-01-01T00:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns the catalog of credit terms (Net 30, Net 60, etc.) used on invoices."}},"/invoiceCOAs":{"get":{"tags":["Invoices"],"operationId":"getInvoiceCOAsInvoiceCOAs","description":"Returns certificate of analysis records for the specified invoices. InvoiceIDs is required.","parameters":[{"name":"InvoiceIDs","in":"query","required":true,"description":"Comma-separated list of invoice IDs to fetch COAs for. Returns 400 if not provided.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"InvoiceID":60001,"ProductID":30001,"InvoiceTransID":61001,"BatchCode":"BATCH-2025-001","COA_URL":"https://cdn.example.com/coa/batch-2025-001.pdf","TimeUpdated":"2025-01-10T14:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns certificate of analysis records for the specified invoices."}},"/invoiceCOAs/{invoiceID}":{"get":{"tags":["Invoices"],"operationId":"getInvoiceCOAsInvoiceCOAsInvoiceID","description":"Returns certificate of analysis records for a single invoice by ID.","parameters":[{"name":"invoiceID","in":"path","required":true,"description":"The ID of the invoice to fetch COAs for.","schema":{"type":"number"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"InvoiceID":60001,"ProductID":30001,"InvoiceTransID":61001,"BatchCode":"BATCH-2025-001","COA_URL":"https://cdn.example.com/coa/batch-2025-001.pdf","TimeUpdated":"2025-01-10T14:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns certificate of analysis records for a single invoice by ID."}},"/locations":{"get":{"tags":["Locations"],"operationId":"getLocationsLocations","description":"Returns warehouse and distribution locations filtered by state and location ID.","parameters":[{"$ref":"#/components/parameters/LocationIDs"},{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"LocationID":40001,"Location":"Alameda","DBA":"Example Sales & Service","Address":"100 Example Loop Rd","Address2":null,"Address3":"N/A","City":"Alameda","State":"CA","PostalCode":"94502","TimeUpdated":"2024-09-23T19:05:39.984Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns warehouse and distribution locations filtered by state and location ID."}},"/locations/{locationID}":{"get":{"tags":["Locations"],"operationId":"getLocationsLocationsLocationID","description":"Returns a single location by ID.","parameters":[{"name":"locationID","in":"path","required":true,"description":"The ID of the location to retrieve.","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"LocationID":40001,"Location":"Alameda","DBA":"Example Sales & Service","Address":"100 Example Loop Rd","Address2":null,"Address3":"N/A","City":"Alameda","State":"CA","PostalCode":"94502","TimeUpdated":"2024-09-23T19:05:39.984Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":false,"summary":"Returns a single location by ID."}},"/menuPromotions":{"get":{"tags":["Promotions"],"operationId":"getMenuPromotions","description":"Returns menu promotions filtered by supplier, state, and active date range.","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/States"},{"name":"StartDate","in":"query","required":false,"description":"ISO 8601 date string. Returns promotions whose end date is on or after this value.","schema":{"type":"string","format":"date"}},{"name":"EndDate","in":"query","required":false,"description":"ISO 8601 date string. Returns promotions whose start date is on or before this value.","schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"MenuPromotionID":84001,"SupplierID":20003,"SupplierName":"Example Supplier","State":"CA","Description":"Featured products for spring menus.","StartDate":"2025-03-01","EndDate":"2025-05-31","TimeUpdated":"2025-02-15T10:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns menu promotions filtered by supplier, state, and active date range."}},"/productCategories":{"get":{"tags":["Products"],"operationId":"getProductCategories","description":"Returns all product categories ordered by sequence.","parameters":[{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"ProductCategoryID":86001,"CategoryName":"Chocolate","Sequence":1,"TimeUpdated":"2025-01-01T00:00:00.000Z"},{"ProductCategoryID":86002,"CategoryName":"Gummies","Sequence":2,"TimeUpdated":"2025-01-01T00:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns all product categories ordered by sequence."}},"/products":{"get":{"tags":["Products"],"operationId":"getProductsProducts","description":"Returns products filtered by supplier, state, product ID, and status.","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/ProductIDs"},{"$ref":"#/components/parameters/States"},{"name":"Statuses","in":"query","required":false,"description":"Comma-separated list of product status IDs. Defaults to Active (1). Ignored when ProductIDs is provided.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"Verified,Received"},"example":"Verified,Received"},{"name":"SupplierProductNumbers","in":"query","required":false,"description":"Comma-separated list of supplier product numbers to filter by. Matches exactly.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"INV-1001,INV-1002"},"example":"INV-1001,INV-1002"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"ProductID":30001,"Supplier":"Example Supplier","SupplierID":20001,"ProductName":"Bar Dark Chocolate","BrandFamily":"Example Bars","ProductTypeName":"Edible - Chocolate","UnitNetWeight":"50g","WholesaleUnitsPerCase":20,"Description":"Our classic Dark Chocolate bar is uniquely complex with flavors of black coffee and dark cherry. Using a 57% sustainably sourced dark chocolate infused with pure, clean cold water hash, this bar is sure to delight any true chocolate lover.Example Brand chocolates are crafted from sustainably sourced, premium cacao infused with pure, hand-crafted cold water hash. Since 2010, Example Brand's mission has been to change how the world views and uses cannabis. By applying art and science to ensure a delicious, consistent experience every time, we continue to deliver on that mission today.","Ingredients":"Semisweet Chocolate (Unsweetened Chocolate, Sugar, Cocoa Butter, Sunflower Lecithin, Vanilla), Cannabis Extract.","ThumbnailImageURL":"https://cdn.example.com/ExampleBrand/S3Images/example-thumbnail-1.png","FullSizeImageURL":"https://cdn.example.com/ExampleBrand/S3Images/example-fullsize-1.png","Potency":"100mg THC","PotencyTHC":null,"Blend":"Hybrid","KSSMenuCategory":"Edibles/Ingestibles","KSSLiveCategoryID":1,"StatusID":1,"TimeUpdated":"2026-02-12T19:51:57.510Z","State":"CA","IsSample":false,"ProductGroupID":3,"BrandStyle":"Example Bar","PackageID":97001,"PackageName":"20 Example Bar","ProductTypeID":96001,"StrainName":null,"StrainID":null,"Flavor":"dark","BrandID":98001,"BrandName":"Example Bars Base","SupplierProductNumber":"EXAMPLE-BAR-DARK-50"},{"ProductID":30002,"Supplier":"Example Supplier","SupplierID":20001,"ProductName":"Bar Milk Chocolate","BrandFamily":"Example Bars","ProductTypeName":"Edible - Chocolate","UnitNetWeight":"50g","WholesaleUnitsPerCase":20,"Description":"Meticulously crafted from the purest ingredients, Example Brand's classic milk chocolate bar has hints of brown butter and a silky, creamy finish. Like all Example Brand chocolates, this bar is crafted from sustainably sourced, premium cacao infused with handmade, cold water cannabis hash. Ideal for those with a love for chocolate and a refined palate.Example Brand chocolates are crafted from sustainably sourced, premium cacao infused with pure, hand-crafted cold water hash. Since 2010, Example Brand's mission has been to change how the world views and uses cannabis. By applying art and science to ensure a delicious, consistent experience every time, we continue to deliver on that mission today.","Ingredients":"Milk Chocolate (Sugar, Cocoa Butter, Milk, Unsweetened Chocolate, Sunflower Lecithin, Vanilla), Cannabis Extract.","ThumbnailImageURL":"https://cdn.example.com/ExampleBrand/S3Images/example-thumbnail-2.png","FullSizeImageURL":"https://cdn.example.com/ExampleBrand/S3Images/example-fullsize-2.png","Potency":"100mg THC","PotencyTHC":null,"Blend":"Hybrid","KSSMenuCategory":"Edibles/Ingestibles","KSSLiveCategoryID":1,"StatusID":1,"TimeUpdated":"2026-02-12T19:51:57.510Z","State":"CA","IsSample":false,"ProductGroupID":3,"BrandStyle":"Example Bar","PackageID":97001,"PackageName":"20 Example Bar","ProductTypeID":96001,"StrainName":null,"StrainID":null,"Flavor":"milk","BrandID":98001,"BrandName":"Example Bars Base","SupplierProductNumber":"EXAMPLE-BAR-MILK-50"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns products filtered by supplier, state, product ID, and status."}},"/products/{productID}":{"get":{"tags":["Products"],"operationId":"getProductsProductsProductID","description":"Returns a single product by ID.","parameters":[{"name":"productID","in":"path","required":true,"description":"The ID of the product to retrieve.","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"ProductID":30001,"Supplier":"Example Supplier","SupplierID":20001,"ProductName":"Bar Dark Chocolate","BrandFamily":"Example Bars","ProductTypeName":"Edible - Chocolate","UnitNetWeight":"50g","WholesaleUnitsPerCase":20,"Description":"Our classic Dark Chocolate bar is uniquely complex with flavors of black coffee and dark cherry. Using a 57% sustainably sourced dark chocolate infused with pure, clean cold water hash, this bar is sure to delight any true chocolate lover.Example Brand chocolates are crafted from sustainably sourced, premium cacao infused with pure, hand-crafted cold water hash. Since 2010, Example Brand's mission has been to change how the world views and uses cannabis. By applying art and science to ensure a delicious, consistent experience every time, we continue to deliver on that mission today.","Ingredients":"Semisweet Chocolate (Unsweetened Chocolate, Sugar, Cocoa Butter, Sunflower Lecithin, Vanilla), Cannabis Extract.","ThumbnailImageURL":"https://cdn.example.com/ExampleBrand/S3Images/example-thumbnail-1.png","FullSizeImageURL":"https://cdn.example.com/ExampleBrand/S3Images/example-fullsize-1.png","Potency":"100mg THC","PotencyTHC":null,"Blend":"Hybrid","KSSMenuCategory":"Edibles/Ingestibles","KSSLiveCategoryID":1,"StatusID":1,"TimeUpdated":"2026-02-12T19:51:57.510Z","State":"CA","IsSample":false,"ProductGroupID":3,"BrandStyle":"Example Bar","PackageID":97001,"PackageName":"20 Example Bar","ProductTypeID":96001,"StrainName":null,"StrainID":null,"Flavor":"dark","BrandID":98001,"BrandName":"Example Bars Base","SupplierProductNumber":"EXAMPLE-BAR-DARK-50"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":false,"summary":"Returns a single product by ID."}},"/promotionsProducts":{"get":{"tags":["Promotions"],"operationId":"getPromotionsProducts","description":"Returns promotion records with their associated products filtered by supplier and state.","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"PromotionID":83001,"PromotionTypeID":4,"States":["CA"],"PromotionName":"Spring Chocolate Deal","ProductOverrideType":"none","UnitPrice":15.5,"StartDate":"2025-01-01","EndDate":"2025-03-31","AllProducts":false,"ProductIDs":[30001,30002,30003],"TimeUpdated":"2024-12-20T10:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns promotion records with their associated products filtered by supplier and state."}},"/retailerInventory":{"get":{"tags":["Inventory"],"operationId":"getRetailerInventory","description":"Returns retailer-level inventory records filtered by customer, supplier, product, and state.","parameters":[{"$ref":"#/components/parameters/CustomerIDs"},{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/ProductIDs"},{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"ID":95001,"ProductID":30001,"CustomerID":10001,"LastInventoryDate":"2025-05-20T06:00:00.000Z","Inventory":"20.00","DailySales":"0.03","TimeUpdated":"2025-06-02T21:31:05.941Z"},{"ID":95002,"ProductID":30002,"CustomerID":10001,"LastInventoryDate":"1999-12-31T07:00:00.000Z","Inventory":"0.00","DailySales":"0.03","TimeUpdated":"2025-06-17T15:46:14.397Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns retailer-level inventory records filtered by customer, supplier, product, and s..."}},"/states":{"get":{"tags":["States"],"operationId":"getStates","description":"Returns the active states available to your API key.","parameters":[{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"StateAbbreviation":"CA","StateName":"California","OrderCutOffTime":"2:30 PM","TimeZone":"America/Los_Angeles","OrderCutOffDaysInAdvance":"1","TimeUpdated":"2025-12-30T18:28:17.710Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns the active states available to your API key."}},"/suppliers":{"get":{"tags":["Suppliers"],"operationId":"getSuppliersSuppliers","description":"Returns suppliers filtered by state, supplier ID, and status.","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/States"},{"name":"Active","in":"query","required":false,"description":"True or False flag for supplier status. Defaults to Active only for Customer and Supplier keys","schema":{"type":"array","items":{"type":"boolean"}}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"SupplierID":20003,"Supplier":"Example Supplier","State":"CA","Active":true,"Description":"Premium cannabis edibles and infused products.","BrandAssetsURL":"https://cdn.example.com/example-brand/brand-assets.zip","SupplierWebsiteURL":"https://www.example.com","TimeUpdated":"2025-01-01T00:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns suppliers filtered by state, supplier ID, and status."}},"/suppliers/creditTerms":{"get":{"tags":["Suppliers"],"operationId":"getSupplierCreditTerms","description":"Returns the credit terms offered by each supplier.","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"SupplierID":20001,"TermID":80001,"Term":"Net 30","TimeUpdated":"2025-01-15T10:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":true},"x-kss-pagination":true,"x-kss-callout":"Not available to customer keys (returns 403). Supplier keys only see rows for their authorized suppliers.","summary":"Returns the credit terms offered by each supplier."}},"/suppliers/{supplierID}":{"get":{"tags":["Suppliers"],"operationId":"getSuppliersSuppliersSupplierID","description":"Returns a single supplier by ID.","parameters":[{"name":"supplierID","in":"path","required":true,"description":"The ID of the supplier to retrieve.","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"SupplierID":20003,"Supplier":"Example Supplier","State":"CA","Active":true,"Description":"Premium cannabis edibles and infused products.","BrandAssetsURL":"https://cdn.example.com/example-brand/brand-assets.zip","SupplierWebsiteURL":"https://www.example.com","TimeUpdated":"2025-01-01T00:00:00.000Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":false,"summary":"Returns a single supplier by ID."}},"/users":{"get":{"tags":["Users"],"operationId":"getUsersUsers","description":"Returns users filtered by state, role, customer ID, and supplier ID. Supplier API keys return their own Supplier users and active Customer users. Customer API keys only return their own Customer users.","parameters":[{"name":"UserIDs","in":"query","required":false,"description":"Comma-separated list of user IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/States"},{"$ref":"#/components/parameters/CustomerIDs"},{"$ref":"#/components/parameters/SupplierIDs"},{"name":"Roles","in":"query","required":false,"description":"Comma-separated list of roles to filter by.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"Employee,Supplier"},"example":"Employee,Supplier"},{"$ref":"#/components/parameters/States"},{"name":"Active","in":"query","required":false,"description":"True or False flag for user status. Defaults to Active = true only for Customer and Supplier keys","schema":{"type":"array","items":{"type":"boolean"}}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"UserID":90002,"SiteUserID":91001,"UserActive":true,"KSSLiveAccess":true,"Email":"buyer@example.com","States":["CA"],"Role":"Customer","CustomerIDs":[10001],"SupplierIDs":null,"LocationIDs":[40002],"PowerUser":false,"JobTitle":null,"Department":null,"FullName":"Jane Buyer"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns users filtered by state, role, customer ID, and supplier ID."}},"/users/{userID}":{"get":{"tags":["Users"],"operationId":"getUsersUsersUserID","description":"Returns a single user by ID.","parameters":[{"name":"userID","in":"path","required":true,"description":"The ID of the user to retrieve.","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"UserID":90002,"SiteUserID":91001,"UserActive":true,"KSSLiveAccess":true,"Email":"buyer@example.com","States":["CA"],"Role":"Customer","CustomerIDs":[10001],"SupplierIDs":null,"LocationIDs":[40002],"PowerUser":false,"JobTitle":null,"Department":null,"FullName":"Jane Buyer"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":false,"summary":"Returns a single user by ID."}},"/payments/types":{"get":{"tags":["Payments"],"operationId":"getPaymentTypes","description":"Returns the list of payment types. Optionally filter by PaymentTypeIDs or SupplierIDs.","parameters":[{"name":"PaymentTypeIDs","in":"query","required":false,"description":"Comma-separated list of payment type IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/SupplierIDs"},{"name":"Active","in":"query","required":false,"description":"True or False flag for supplier status. Defaults to Active only; only Employee keys may override.","schema":{"type":"array","items":{"type":"boolean"}}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"PaymentTypeID":82401,"Name":"ACH","SupplierID":null,"TimeCreated":"2025-01-01T00:00:00.000Z","TimeUpdated":"2025-01-01T00:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"Each payment type is returned once per supplier in its product groups. Results default to active suppliers only; Employee keys may include inactive suppliers with the Active filter. Supplier keys only see rows for their authorized suppliers, plus the shared generic payment type (PaymentTypeID = -1).","summary":"Returns the list of payment types."}},"/payments":{"get":{"tags":["Payments"],"operationId":"getPayments","description":"Returns payments for an AR account, including payment type and available balance. AvailableBalance is the payment's remaining credit after confirmed applications and pending requests, and is never negative. A reversed payment can appear with a negative Amount and an AvailableBalance of 0.","parameters":[{"name":"ARAccountIDs","in":"query","required":false,"description":"Comma-separated list of AR account IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/SupplierIDs"},{"name":"PaymentTypeIDs","in":"query","required":false,"description":"Comma-separated list of payment type IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"PaymentID":82001,"PaymentInvoiceID":82201,"PaymentInvoiceNum":"INV-PAY-0001","ARAccountID":81002,"PaymentTypeID":82401,"PaymentTypeName":"ACH","Amount":"5000.000000","SupplierID":null,"LoadSheetStatusID":7,"PostDate":"2025-03-01T00:00:00.000Z","TimeCreated":"2025-03-01T08:00:00.000Z","TimeUpdated":"2025-03-01T08:00:00.000Z","ARNote":null,"Memo":"Check #12345","AvailableBalance":"3500.000000"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"Customer keys only see payments for their authorized AR accounts. Supplier keys only see payments belonging to their authorized suppliers.","summary":"Returns payments for an AR account, including payment type and available balance."}},"/payments/openInvoices":{"get":{"tags":["Payments"],"operationId":"getOpenInvoices","description":"Returns invoices with a non-zero open balance. Used to identify invoices eligible for payment allocation.","parameters":[{"name":"ARAccountIDs","in":"query","required":false,"description":"Comma-separated list of AR account IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"InvoiceID":60002,"InvoiceNum":"INV-2025-0042","CustomerID":10001,"ARAccountID":81002,"InvoiceTotal":"1200.00","OpenDebit":"1200.00","OpenCredit":"0.00","OpenBalance":"1200.00","CreditTermID":5,"TermID":5,"DueDate":"2025-04-01T00:00:00.000Z","Date":"2025-03-01T00:00:00.000Z","PONum":"PO-2025-001"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"Customer keys only see invoices for their authorized AR accounts; InvoiceTotal and OpenBalance reflect the entire invoice. Supplier keys only see invoices that contain their products; InvoiceTotal and OpenBalance reflect only the portion of the invoice attributable to the supplier, and OpenDebit / OpenCredit are not returned.","summary":"Returns invoices with a non-zero open balance."}},"/payments/applications":{"get":{"tags":["Payments"],"operationId":"getPaymentApplications","description":"Returns payment allocations and allocation requests, each with its current Status (Pending, Exported, Confirmed, or Rejected). Includes both API-initiated requests and allocations applied directly in Encompass.","parameters":[{"name":"ARAccountIDs","in":"query","required":false,"description":"Comma-separated list of AR account IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/SupplierIDs"},{"name":"PaymentInvoiceNums","in":"query","required":false,"description":"Comma-separated list of payment invoice numbers to filter by.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"value1,value2"},"example":"value1,value2"},{"name":"TargetInvoiceNums","in":"query","required":false,"description":"Comma-separated list of target invoice numbers to filter by.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"value1,value2"},"example":"value1,value2"},{"name":"Statuses","in":"query","required":false,"description":"Comma-separated list of statuses to filter by.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"Verified,Received"},"example":"Verified,Received"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"PaymentApplicationID":82101,"RequestID":82301,"PaymentInvoiceNum":"INV-PAY-0001","TargetInvoiceNum":"INV-2025-0042","ARAccountID":81002,"Amount":"1200.00","Status":"Confirmed","RequestedByUserID":90002,"AppliedBy":"jsmith","TimeRequested":"2025-03-08T09:00:00.000Z","TimeExported":"2025-03-08T09:05:00.000Z","TimeApplied":"2025-03-10T14:00:00.000Z","TimeUpdated":"2025-03-10T14:00:00.000Z"},{"PaymentApplicationID":null,"RequestID":82302,"PaymentInvoiceNum":"INV-PAY-0002","TargetInvoiceNum":"INV-2025-0099","ARAccountID":81002,"Amount":"500.00","Status":"Pending","RequestedByUserID":90002,"AppliedBy":null,"TimeRequested":"2025-03-19T10:00:00.000Z","TimeExported":null,"TimeApplied":null,"TimeUpdated":"2025-03-19T10:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"x-kss-callout":"Customer keys only see allocations for their authorized AR accounts. Supplier keys only see allocations whose payment belongs to one of their authorized suppliers. RequestID is null for allocations applied directly in Encompass; PaymentApplicationID and TimeApplied are populated once a request has been confirmed.","summary":"Returns payment allocations and allocation requests, each with its current Status (Pend..."},"post":{"tags":["Payments"],"operationId":"createRequestedPaymentApplication","description":"Creates a payment allocation request. Validates the payment has sufficient available balance and the target invoice belongs to the same AR account. The request is queued as Pending and exported to Encompass on the next export run.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"PaymentInvoiceNum","in":"query","required":true,"description":"The invoice number of the payment to allocate from.","schema":{"type":"string"}},{"name":"TargetInvoiceNum","in":"query","required":true,"description":"The invoice number to allocate the payment toward.","schema":{"type":"string"}},{"name":"ARAccountID","in":"query","required":true,"description":"The AR account ID both invoices belong to.","schema":{"type":"number"}},{"name":"Amount","in":"query","required":true,"description":"The dollar amount to allocate. Must be positive and not exceed the available balance.","schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":{"RequestID":82302,"PaymentInvoiceNum":"INV-PAY-0001","TargetInvoiceNum":"INV-2025-0042","ARAccountID":81002,"Amount":"500.00","Status":"Pending","RequestedByUserID":90002,"TimeRequested":"2025-03-19T10:00:00.000Z","TimeExported":null,"TimeConfirmed":null,"MatchedPaymentApplicationID":null,"TimeUpdated":"2025-03-19T10:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":true,"customerRestricted":false},"x-kss-pagination":false,"x-kss-callout":"Not available to supplier keys (returns 403). Customer keys may only request allocations against their authorized AR accounts.","summary":"Creates a payment allocation request."}},"/vendors":{"get":{"tags":["Vendors"],"operationId":"getVendors","description":"Returns the vendors a supplier ships from for each warehouse location, including address, lead time, and DOI targets.","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/LocationIDs"},{"name":"VendorIDs","in":"query","required":false,"description":"Comma-separated list of vendor IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"name":"Active","in":"query","required":false,"description":"True or False flag for vendor status. Defaults to Active = true; only Employee keys may request inactive vendors.","schema":{"type":"array","items":{"type":"boolean"}}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"SupplierID":20001,"LocationID":40002,"VendorID":50002,"VendorName":"Acme Distributing","VendorLicenseNumber":"C11-0000042-LIC","VendorAddress":"500 Industrial Way","VendorAddress2":null,"VendorCity":"Oakland","VendorState":"CA","VendorPostalCode":"94607","LeadTimeDays":5,"TargetDOI":14,"MaxDOI":30,"PickupDates":["Mon","Wed","Fri"],"RequirePOBatchCodes":false,"Active":true,"TimeUpdated":"2025-01-15T10:00:00.000Z"}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":true},"x-kss-pagination":true,"x-kss-callout":"Not available to customer keys (returns 403). Supplier keys only see vendors for their authorized suppliers. Inactive vendors are hidden unless an Employee key explicitly requests them via Active=false.","summary":"Returns the vendors a supplier ships from for each warehouse location, including addres..."}},"/purchases":{"get":{"tags":["Purchases"],"operationId":"getPurchasesPurchases","description":"Returns ERP-posted purchase orders filtered by purchase ID, vendor, location, status, and date range. Not accessible to Customer API keys.","parameters":[{"name":"PurchaseIDs","in":"query","required":false,"description":"Comma-separated list of numeric purchase IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"name":"VendorIDs","in":"query","required":false,"description":"Comma-separated list of vendor IDs to filter by.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/LocationIDs"},{"name":"Statuses","in":"query","required":false,"description":"Comma-separated list of posted purchase statuses to filter by.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"Verified,Received"},"example":"Verified,Received"},{"name":"StartDate","in":"query","required":false,"description":"ISO 8601 date string. Returns purchases with a PostDate on or after this date.","schema":{"type":"string","format":"date"}},{"name":"EndDate","in":"query","required":false,"description":"ISO 8601 date string. Returns purchases with a PostDate on or before this date.","schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPurchaseResponse"},"example":{"Data":[{"PurchaseID":70001,"ReceiveDate":"2026-06-02T06:00:00.000Z","ShipmentNum":"Example PO 70001","ShipmentID":72001,"ToLocationID":40001,"ToLocationName":"Alameda","VendorName":"EXAMPLE DISTRIBUTORS LLC (Example Location)","VendorID":50001,"PostDate":"2026-06-02T06:00:00.000Z","Status":"Verified","PONum":"Example PO 70001","Freight":"0.00","Tax":"0.00","OtherCost":"0.00","Total":"35726.38","TotalCases":"184.00","PublicPDFLink":null,"PurchasePDFURLAPIKeyID":94001,"Memo":null,"LastEditTime":null,"LastCalcTime":"2026-06-04T10:20:14.000Z","TimeUpdated":"2026-08-21T18:06:57.930Z","InvoiceDate":"2026-06-01T06:00:00.000Z","DueDate":"2026-08-30T06:00:00.000Z","Terms":"Driver Accounts","TermID":80002,"TimeCreated":"2026-06-15T22:09:09.921Z","PurchaseGlobalID":"00000AAAAAFFFFF00000AAAAAF","ReceivingNum":null}],"Page":1,"PageSize":50,"HasNextPage":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":true},"x-kss-pagination":true,"x-kss-new-version":{"version":"v2","path":"/purchases"},"summary":"Returns ERP-posted purchase orders filtered by purchase ID, vendor, location, status, a..."}},"/purchases/{purchaseID}":{"get":{"tags":["Purchases"],"operationId":"getPurchaseByID","description":"Returns ERP-posted purchase orders matching a numeric purchase ID. The response uses the same paginated array envelope as GET /purchases. Not accessible to Customer API keys.","parameters":[{"name":"purchaseID","in":"path","required":true,"description":"Numeric ERP purchase ID.","schema":{"type":"number"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPurchaseResponse"},"example":{"Data":[{"PurchaseID":70001,"ReceiveDate":"2026-06-02T06:00:00.000Z","ShipmentNum":"Example PO 70001","ShipmentID":72001,"ToLocationID":40001,"ToLocationName":"Alameda","VendorName":"EXAMPLE DISTRIBUTORS LLC (Example Location)","VendorID":50001,"PostDate":"2026-06-02T06:00:00.000Z","Status":"Verified","PONum":"Example PO 70001","Freight":"0.00","Tax":"0.00","OtherCost":"0.00","Total":"35726.38","TotalCases":"184.00","PublicPDFLink":null,"PurchasePDFURLAPIKeyID":94001,"Memo":null,"LastEditTime":null,"LastCalcTime":"2026-06-04T10:20:14.000Z","TimeUpdated":"2026-08-21T18:06:57.930Z","InvoiceDate":"2026-06-01T06:00:00.000Z","DueDate":"2026-08-30T06:00:00.000Z","Terms":"Driver Accounts","TermID":80002,"TimeCreated":"2026-06-15T22:09:09.921Z","PurchaseGlobalID":"00000AAAAAFFFFF00000AAAAAF","ReceivingNum":null}],"Page":1,"PageSize":50,"HasNextPage":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":true},"x-kss-pagination":true,"x-kss-new-version":{"version":"v2","path":"/purchases/{purchaseID}"},"summary":"Returns ERP-posted purchase orders matching a numeric purchase ID."}},"/purchaseTrans":{"get":{"tags":["Purchase Transactions"],"operationId":"getPurchaseTrans","description":"Returns purchase order line items for one or more purchases. PurchaseIDs is required. Not accessible to Customer API keys.","parameters":[{"name":"PurchaseIDs","in":"query","required":true,"description":"Comma-separated list of purchase IDs to retrieve line items for.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$","example":"1,2,3"},"example":"1,2,3"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPurchaseTransactionResponse"},"example":{"Data":[{"PurchaseTransID":71001,"PurchaseID":70002,"ProductID":30006,"Ordered":"10","NumUnits":"120","FOB":"12.50","DepositCost":"0.00","ExtPrice":"1500.00","ExpirationDate":"2026-01-01T00:00:00.000Z","CodeDate":"2025-01-15T00:00:00.000Z","BatchCode":"BCH-001","LaidInCost":"13.00","PalletTag":null,"Cases":"10","Weight":"120.00","TimeUpdated":"2025-03-02T10:00:00.000Z"}],"Page":1,"PageSize":50,"HasNextPage":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":true},"x-kss-pagination":true,"x-kss-new-version":{"version":"v2","path":"/purchaseTrans"},"summary":"Returns purchase order line items for one or more purchases."}},"/salesReps":{"get":{"tags":["Sales Reps"],"operationId":"getSalesReps","description":"Returns sales reps grouped by user, including both Territory Managers and Supplier Reps. Each result includes the rep's name, email, type, the product groups they cover, and arrays of associated customers and suppliers. Type is derived from ProductGroup: 'Supplier' indicates a Supplier Rep; any other value (e.g. a product-line group such as 'Cookies' or 'Tinctures') indicates a Territory Manager. Only returns active users, active customers, and active suppliers. Supplier API keys see reps scoped to their authorized suppliers. Customer API keys only see reps assigned to their own customers.","parameters":[{"$ref":"#/components/parameters/SupplierIDs"},{"$ref":"#/components/parameters/CustomerIDs"},{"name":"ProductGroups","in":"query","required":false,"description":"Comma-separated list of product group names to filter by. Use 'Supplier' to limit results to Supplier Reps, or product-line names (e.g. 'Cookies') to limit to Territory Managers covering those groups.","schema":{"type":"string","pattern":"^[^,]+(,[^,]+)*$","example":"Supplier,Cookies"},"example":"Supplier,Cookies"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"Data":[{"UserID":90001,"Name":"Jane Smith","Email":"jane.smith@example.com","Type":"Territory Manager","ProductGroups":["Cookies","Tinctures"],"Suppliers":[{"SupplierID":20004,"Supplier":"Example Confections"}],"Customers":[{"CustomerID":10002,"CustomerName":"Acme Dispensary"},{"CustomerID":10003,"CustomerName":"Example Leaf Co"}]},{"UserID":90002,"Name":"Bob Jones","Email":"bob.jones@supplier.com","Type":"Supplier Rep","ProductGroups":["Supplier"],"Suppliers":[{"SupplierID":20004,"Supplier":"Example Confections"},{"SupplierID":20005,"Supplier":"Example Brand 2"}],"Customers":[{"CustomerID":10002,"CustomerName":"Acme Dispensary"}]}],"Page":1,"PageSize":50}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"}},"x-kss-auth":{"supplierRestricted":false,"customerRestricted":false},"x-kss-pagination":true,"summary":"Returns sales reps grouped by user, including both Territory Managers and Supplier Reps."}}}}