### Allocate Work Order Component API Example Source: https://help.ordertime.com/help/work-order-api-a-z Demonstrates allocating a work order component using the Bin and Lot or Serial No Quantity Import POST endpoint. This example allocates a specific quantity from a designated bin for a given item and line number. ```json { "$type": "AOLib7.ImportFillBin, AOLib7", "TranType": 3, "DocNo": 658, "ItemRef": { "Name": "112" }, "BinRef": { "Name": "Floor" }, "Quantity": 25, "LineNo": 5 } ``` -------------------------------- ### Lists API Source: https://help.ordertime.com/help/working-with-entity-refs The Lists endpoint allows you to retrieve arrays of objects or record counts based on specified criteria. It supports POST for retrieving data and PUT for getting record counts. ```APIDOC ## Lists API ### Description Retrieves lists of objects or record counts based on specified criteria. Use POST to get an array of objects and PUT to get the total count of matching records. ### Method POST, PUT ### Endpoint `/list` ### Parameters #### Query Parameters None #### Request Body **ListInfo** (object) - Required - An object containing details about the type of objects to retrieve and filtering criteria. - **Type** (RecordTypeEnum) - Required - Specifies the type of object list to retrieve (e.g., Customer, Item). - **Filters** (array) - Optional - An array of filter objects to narrow down the results. - **PropertyName** (string) - The name of the property to filter on. - **Operator** (int) - The filter operator (e.g., 12 for LIKE). - **FilterValueArray** (string) - The value(s) to filter by. For date ranges, use specific formats. - **FieldType** (int) - Optional - Specifies the data type for filtering (e.g., 10 for Date). - **DateMacro** (int) - Optional - A macro for date-based filtering (e.g., 9 for This Year). - **Sortation** (object) - Optional - Specifies how to sort the results. - **PropertyName** (string) - The property to sort by. - **Direction** (int) - The sort direction (e.g., 2 for Descending). - **PageNumber** (int) - Optional - The page number for pagination. - **NumberOfRecords** (int) - Optional - The number of records per page. ### Request Example (POST - Get Objects) ```json { "Type": 250, "Filters": [ { "PropertyName": "Name", "Operator": 12, "FilterValueArray": "UPS" } ], "Sortation": { "PropertyName": "Id", "Direction": 2 }, "PageNumber": 1, "NumberOfRecords": 20 } ``` ### Response #### Success Response (200 - POST) An array of objects matching the specified criteria. #### Success Response (200 - PUT) An integer representing the count of records matching the specified criteria. #### Response Example (POST) ```json [ { "Id": 15, "Name": "UPS Ground" }, { "Id": 4, "Name": "UPS" } ] ``` #### Response Example (PUT) ```json 50 ``` ```