POST /api/.../workflow
This method starts the process to save a purchase order line item and its segments.
    This call requires the following permissions for modify or create:
    
Modify purchase order line item:
    
| Name | Type | Required | Description | 
|---|---|---|---|
| WorkflowRequest | DtoWorkflowRequest | Yes | Define this parameter in the request body. | 
| Property | Type | Nullable | Description | 
|---|---|---|---|
| WorkflowRequestType | Int | No | Required. To save a purchase order line item, this must be set to 33 (SavePOLineItem). | 
| TxnBranchID | Int | No | Transacting branch ID. | 
| TxnUserID | Int | No | Transacting Polaris user ID. | 
| TxnWorkstationID | Int | No | Transacting workstation ID. | 
| RequestExtension | DtoWorkflowRequestExtension | No | |
| WorkflowReplies | List of DtoWorkflowReply | Yes | In the future, it may be possible to pass in a list of replies for automated processing. | 
| Property | Type | Nullable | Description | 
|---|---|---|---|
| WorkflowRequestExtensionType | Int | No | To save a purchase order line item, the extension type must be a 30 (POLineItemData). | 
| Data | Object | No | This must be an extension data object of type DtoPOLineItemExtensionData | 
| Property | Type | Nullable | Description | 
|---|---|---|---|
| POLineItemID | Integer | No | Primary key. Used to update purchaser order line item. Should be zero to create purchase order line item. | 
| PurchaseOrderID | Integer | Yes | The unique id assigned to the purchase order. Required to create POLI. | 
| BibliographicRecordID | Integer | No | |
| ListPriceUnitBase | Decimal | No | |
| DiscPriceUnitBase | Decimal | Yes | |
| DisplayInPac | Byte | Yes | |
| Author | String | Yes | Used to create POLI. | 
| Alert | Boolean | Yes | |
| AutoCancelInd | Boolean | Yes | |
| BackorderInstrID | Int | Yes | |
| BindingFormatID | Int | Yes | |
| BindingSubInstrID | Integer | Yes | |
| CatalogNumber | String | Yes | |
| CatServInstrID | Integer | Yes | |
| CatServQnty | Integer | Yes | |
| ClmAlertDate | DateTime | Yes | |
| ClmWtPer1 | Integer | Yes | |
| ClmWtPer2 | Integer | Yes | |
| ClmWtPer3 | Integer | Yes | |
| ClmWtPer4 | Integer | Yes | |
| ClmWtPer5 | Integer | Yes | |
| CopyNumber | Integer | Yes | |
| ClmNoticeInd | Boolean | Yes | |
| CanNoticeInd | Boolean | Yes | |
| CanWtPer | Integer | Yes | |
| ClmCycNum | Integer | Yes | |
| DiscRate | Decimal | Yes | |
| ISBN_ISSN | String | Yes | |
| Edition | String | Yes | |
| LineNumber | Int | Yes | Ignored when creating a new PO line item. | 
| MaterialTypeID | Int | Yes | |
| MARCLCCN | String | Yes | |
| MaxClaims | Int | Yes | |
| NotePub | String | Yes | |
| NoteStaff | String | Yes | |
| NoteSupplier | String | Yes | |
| POConfirmDate | Datetime | Yes | |
| Publisher | String | Yes | |
| PublicationDate | String | Yes | |
| RentalReturnDate | Datetime | Yes | |
| ReqName | String | Yes | |
| StartDate | Datetime | Yes | |
| StartNumber | String | Yes | |
| SubscrExpDate | Datetime | Yes | |
| TitleOrderedAs | String | Yes | |
| StatusID | Int | Yes | Ignored when creating a new PO line item. | 
| StatusDate | Datetime | Yes | Ignored when creating a new PO line item. | 
| Title | String | Yes | Used to create POLI. | 
| TemplateID | Int | Yes | Bibliographic template ID. Ignored when updating or creating PO line item with exisiting bib. | 
| Segments | Array of DtoPOLineSegmentUpdate | Yes | PO line segments | 
| Property | Type | Nullable | Description | 
|---|---|---|---|
| POLineItemSegmentID | Int | No | ID of the segment. For new segments, the value should be decreased with negative increments starting from zero. Example: 0, -1, -2 | 
| POLISegmentNumber | Int | Yes | |
| BindFormatChargeBase | Decimal | Yes | Label for the address type | 
| CatServChargeBase | Decimal | Yes | |
| DestinationOrgID | Int | Yes | |
| DestinationCollectionID | Int | Yes | |
| Funds | Array of Integers | Yes | |
| OtherChargeBase | Decimal | Yes | |
| ServChargeBase | Decimal | Yes | |
| ShipChargeBase | Decimal | Yes | |
| SpecialHandChargeBase | Decimal | Yes | |
| QuantOrd | Short | Yes | 
{
    "WorkflowRequestType": 33,
    "TxnBranchID": 3,
    "TxnUserID": 1,
    "TxnWorkstationID": 1237,
    "RequestExtension":
    {
        "WorkflowRequestExtensionType": 30,
        "Data":{
            
                "POLineItemID":154600,
                "PurchaseOrderID":5079,
                "Author":"Irving, John, 1940",
                "Alert":"true",
                "AutoCancelInd":"false",
                "BibliographicRecordID":622852,
                "BackorderInstrID":1,
                "BindingFormatID":1,
                "BindingSubInstrID":1,
                "CatalogNumber":"1234",
                "CatServInstrID":"1",
                "ClmAlertDate":"01/12/2022",
                "ClmWtPer1":"1",
                "ClmWtPer2":"1",
                "ClmWtPer3":"1",
                "ClmWtPer4":"1",
                "ClmWtPer5":"1",
                "ClmCycNum":"1",
                "CopyNumber":"1",
                "ClmNoticeInd":"true",
                "CanNoticeInd":"true",
                "CanWtPer":"1",
                "DiscRate":"6",
                "CatServQnty":"1",
                "DiscPriceUnitBase":"7.60",
                "DisplayInPac":1,
                "ISBN_ISSN":"1415920109 :",
                "ListPriceUnitBase":"7.60",
                "LineNumber":1,
                "MaxClaims":5,
                "MaterialTypeID":1,
                "NotePub":"Public note",
                "NoteStaff":"Staff note",
                "NoteSupplier":"Supplier note",
                "POConfirmDate":"01/12/2022",
                "TitleOrderedAs":"I found you",
                "Segments":
                        [
                            {
                            "POLineItemSegmentID":393480,
                            "DestinationCollectionID":32,
                            "BindFormatChargeBase":1,
                            "DestinationOrgID":101,
                            "CatServChargeBase":1,
                            "ServChargeBase":1,
                            "OtherChargeBase":1,
                            "ShipChargeBase":1,
                            "SpecialHandChargeBase":1,
                            "Funds":[1815],
                            "QuantOrd":1
                            },
                            {
                            "POLineItemSegmentID":0,
                            "DestinationCollectionID":70,
                            "BindFormatChargeBase":1,
                            "DestinationOrgID":3,
                            "CatServChargeBase":1,
                            "ServChargeBase":1,
                            "OtherChargeBase":1,
                            "ShipChargeBase":0,
                            "SpecialHandChargeBase":0,
                            "Funds":[3357],
                            "QuantOrd":1
                            },
                            {
                            "POLineItemSegmentID":-1,
                            "DestinationCollectionID":70,
                            "BindFormatChargeBase":1,
                            "DestinationOrgID":3,
                            "CatServChargeBase":1,
                            "ServChargeBase":1,
                            "OtherChargeBase":1,
                            "ShipChargeBase":0,
                            "SpecialHandChargeBase":0,
                            "Funds":[3357],
                            "QuantOrd":1
                            },
                        ]
            }
        }
    },
    "WorkflowReplies":null
    }
        
{
    "WorkflowRequestType":33,
    "TxnBranchID":"3",
    "TxnUserID":"1",
    "TxnWorkstationID":"1237",
    "CircTranType":0,
    "WorkflowReplies":[],
    "RequestExtension":
    {
        "WorkflowRequestExtensionType":30,
        "Data":{
                "POLineItemID":0,
                "PurchaseOrderID":16299,
                "CopyNumber":null,
                "LineNumber":17,
                "ReqName":null,
                "StartDate":null,
                "StartNumber":null,
                "SubscrExpDate":null,
                "StatusID":12,
                "StatusDate":"2022-08-03T14:32:20.47-04:00",
                "Author":null,
                "Alert":false,
                "BibliographicRecordID":650452,
                "CatalogNumber":"013131354997",
                "DiscRate":0,
                "DiscPriceUnitBase":11.24,
                "ISBN_ISSN":null,
                "ListPriceUnitBase":11.24,
                "MaterialTypeID":3,
                "MARCLCCN":null,
                "Title":"Yoga weight-loss workout for dummies [DVD]",
                "DisplayInPac":1,
                "NotePub":null,
                "NoteStaff":null,
                "BackorderInstrID":null,
                "BindingFormatID":null,
                "BindingSubInstrID":null,
                "CatServInstrID":1,
                "CatServQnty":null,
                "NoteSupplier":null,
                "TitleOrderedAs":"Yoga weight loss workout for dummies [videorecording].",
                "POConfirmDate":null,
                "RentalReturnDate":null,
                "AutoCancelInd":false,
                "ClmAlertDate":null,
                "ClmWtPer1":null,
                "ClmWtPer2":null,
                "ClmWtPer3":null,
                "ClmWtPer4":null,
                "ClmWtPer5":null,
                "ClmCycNum":null,
                "ClmNoticeInd":false,
                "CanNoticeInd":false,
                "CanWtPer":null,
                "MaxClaims":null,
                "Segments":[
                {
                    "POLineItemSegmentID":0,
                    "POLISegmentNumber":1,
                    "QuantOrd":1,
                    "DestinationCollectionID":null,
                    "DestinationOrgID":7,
                    "CatServChargeBase":0,
                    "SpecialHandChargeBase":0,
                    "ServChargeBase":0,
                    "ShipChargeBase":0,
                    "BindFormatChargeBase":0,
                    "OtherChargeBase":0,
                    "Funds":[3036]
                },
                {
                    "POLineItemSegmentID":-1,
                    "POLISegmentNumber":2,
                    "QuantOrd":1,
                    "DestinationCollectionID":null,
                    "DestinationOrgID":103,
                    "CatServChargeBase":0,
                    "SpecialHandChargeBase":0,
                    "ServChargeBase":0,
                    "ShipChargeBase":0,
                    "BindFormatChargeBase":0,
                    "OtherChargeBase":0,
                    "Funds":[3036]
                }
            ]
        }
    }
}
        
{
    "WorkflowRequestType":33,
    "TxnBranchID":"3",
    "TxnUserID":"1",
    "TxnWorkstationID":"1237",
    "CircTranType":0,
    "WorkflowReplies":[],
    "RequestExtension":
    {
        "WorkflowRequestExtensionType":30,
        "Data":
        {
            "POLineItemID":0,
            "PurchaseOrderID":"4799",
            "LineNumber":37,
            "StatusID":12,
            "StatusDate":"2022-08-22T19:30:49.765Z",
            "BibliographicRecordID":0,
            "DiscRate":22,
            "DiscPriceUnitBase":null,
            "ListPriceUnitBase":1,
            "DisplayInPac":1,
            "NotePub":null,
            "NoteStaff":null,
            "BackorderInstrID":null,
            "BindingFormatID":null,
            "BindingSubInstrID":null,
            "CatServInstrID":null,
            "AutoCancelInd":false,
            "ClmAlertDate":null,
            "ClmWtPer1":120,
            "ClmWtPer2":30,
            "ClmWtPer3":null,
            "ClmWtPer4":null,
            "ClmWtPer5":null,
            "ClmNoticeInd":true,
            "CanNoticeInd":true,
            "CanWtPer":null,
            "MaxClaims":2,
            "PONumber":"123456789012",
            "Title":"With Template",
            "TemplateID":1358,
            "Segments":
            [
                {
                    "POLineItemSegmentID":0,
                    "POLISegmentNumber":1,
                    "QuantOrd":1,
                    "DestinationCollectionID":null,
                    "DestinationOrgID":3,
                    "CatServChargeBase":0,
                    "SpecialHandChargeBase":0,
                    "ServChargeBase":0,
                    "ShipChargeBase":0,
                    "BindFormatChargeBase":0,
                    "OtherChargeBase":0,
                    "Funds":[5434]
                }
            ]
        }
    }
        
{
  "WorkflowRequestGuid": "325d8365-61eb-45de-a1f1-21518b2f4f80",
  "WorkflowRequestType": 33,
  "WorkflowStatus": -3,
  "Prompt": {
    "WorkflowPromptID": 134,
    "Name": null,
    "Description": null,
    "WorkflowPromptType": 52,
    "WorkflowPromptOptions": 8,
    "DefaultPromptOption": 1,
    "Title": "Invalid data",
    "Message": "Unable to save the line item without the following information:
Bibliographic record",
    "AlternateMessage": "",
    "AlternateYesText": "",
    "AlternateNoText": "",
    "AlternateCancelText": "",
    "AlternateContinueText": "",
    "PromptExtension": null
  },
  "InformationMessages": [],
  "AnswerExtension": null,
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false
}
        
{
   "WorkflowRequestGuid": "bd4c601f-a59b-432d-925c-06e28b2258e9",
  "WorkflowRequestType": 33,
  "WorkflowStatus": -3,
  "Prompt": {
    "WorkflowPromptID": 134,
    "Name": null,
    "Description": null,
    "WorkflowPromptType": 50,
    "WorkflowPromptOptions": 8,
    "DefaultPromptOption": 1,
    "Title": "Missing Required Segment Information",
    "Message": null,
    "AlternateMessage": "",
    "AlternateYesText": "",
    "AlternateNoText": "",
    "AlternateCancelText": "",
    "AlternateContinueText": "",
    "PromptExtension": {
      "WorkflowPromptExtensionType": 44,
      "Data": {
        "ShowCheckbox": false,
        "CheckboxText": null,
        "IsChecked": false,
        "Columns": [
          {
            "Name": "Segment Number",
            "Key": "POLISegmentNumber",
            "Type": "Text"
          },
          {
            "Name": "Description",
            "Key": "Description",
            "Type": "Text"
          }
        ],
        "Data": [
          {
            "POLISegmentNumber": 2,
            "Description": "100% Fund allocation"
          },
          {
            "POLISegmentNumber": 3,
            "Description": "100% Fund allocation"
          }
        ]
      }
    }
  },
  "InformationMessages": [],
  "AnswerExtension": null,
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false
}
        
{
    "WorkflowRequestGuid": "e3cb3981-dcb1-4096-96a8-940ba08adf64",
      "WorkflowRequestType": 33,
      "WorkflowStatus": -3,
      "Prompt": {
        "WorkflowPromptID": 136,
        "Name": null,
        "Description": null,
        "WorkflowPromptType": 50,
        "WorkflowPromptOptions": 8,
        "DefaultPromptOption": 1,
        "Title": "Duplicate Detection Error(s)",
        "Message": "The following segments have duplicate destinations, collections, and funds:",
        "AlternateMessage": "",
        "AlternateYesText": "",
        "AlternateNoText": "",
        "AlternateCancelText": "",
        "AlternateContinueText": "",
        "PromptExtension": {
          "WorkflowPromptExtensionType": 44,
          "Data": {
            "ShowCheckbox": false,
            "CheckboxText": null,
            "IsChecked": false,
            "Columns": [
              {
                "Name": "Line Item",
                "Key": "LineNumber",
                "Type": "Text"
              },
              {
                "Name": "Suspected Duplicates",
                "Key": "SuspectedDuplicates",
                "Type": "Text"
              }
            ],
            "Data": [
              {
                "LineNumber": 1,
                "SuspectedDuplicates": "Segments 1 and 2 are suspected duplicates."
              }
            ]
          }
        }
    },
  "InformationMessages": [],
  "AnswerExtension": null,
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false
}
        
{
  {
  "WorkflowRequestGuid": "c842f367-05ff-442c-b67e-3860aad57b40",
  "WorkflowRequestType": 33,
  "WorkflowStatus": -3,
  "Prompt": {
    "WorkflowPromptID": 135,
    "Name": null,
    "Description": null,
    "WorkflowPromptType": 50,
    "WorkflowPromptOptions": 6,
    "DefaultPromptOption": 4,
    "Title": "Duplicate segments exists",
    "Message": "This item(s) found on the orders listed. Do you want to order anyway",
    "AlternateMessage": "",
    "AlternateYesText": "",
    "AlternateNoText": "",
    "AlternateCancelText": "",
    "AlternateContinueText": "",
    "PromptExtension": {
      "WorkflowPromptExtensionType": 44,
      "Data": {
        "ShowCheckbox": false,
        "CheckboxText": null,
        "IsChecked": false,
        "Columns": [
          {
            "Name": "PO Number",
            "Key": "PONumber",
            "Type": "Text"
          },
          {
            "Name": "Line Number",
            "Key": "LineNumber",
            "Type": "Text"
          },
          {
            "Name": "Segment Number",
            "Key": "SegNumber",
            "Type": "Text"
          },
          {
            "Name": "Segment Status",
            "Key": "SegStatus",
            "Type": "Text"
          },
          {
            "Name": "Destination",
            "Key": "Destination",
            "Type": "Text"
          },
          {
            "Name": "Collection",
            "Key": "Collection",
            "Type": "Text"
          },
          {
            "Name": "Number of Copies",
            "Key": "NoOfCopies",
            "Type": "Text"
          }
        ],
        "Data": [
          {
            "PONumber": "SAL824",
            "LineNumber": 1,
            "SegNumber": 1,
            "SegStatus": "Pending",
            "Destination": "Southern Adirondack Library System",
            "Collection": "Children's Nonfiction",
            "NoOfCopies": 1
          }
        ]
      }
    }
  },
  "InformationMessages": [],
  "AnswerExtension": null,
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false
}
        
{
  "WorkflowRequestGuid": "128172b6-93ef-4605-af45-29ff2d0cd953",
  "WorkflowRequestType": 33,
  "WorkflowStatus": 1,
  "Prompt": null,
  "InformationMessages": [
    {
      "Type": 1,
      "Title": "",
      "Message": "Purchase order line item update successful."
    }
  ],
  "AnswerExtension": null,
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false
}
        
        
{
  "WorkflowRequestGuid": "00000000-0000-0000-0000-000000000000",
  "WorkflowRequestType": 33,
  "WorkflowStatus": 1,
  "Prompt": null,
  "InformationMessages": [
    {
      "Type": 1,
      "Title": "",
      "Message": "Purchase order line item created successfully"
    }
  ],
  "AnswerExtension": {
    "WorkflowAnswerExtensionType": 14,
    "Data": {
      "POLineItemID": 223999
    }
  },
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false
}
        
        | Code | Description | 
|---|---|
| 200 | OK. Success | 
Permission IDs found here.
    CR_AccessAcquisitions_Allow
    CR_PurchaseOrders_Access
    CR_PurchaseOrders_Modify to update
    CR_PurchaseOrders_Create to create
    CR_BibliographicRecords_Access to create with new bib record
    CR_CreateABibRecordFromAcquisitionsAndSerials_Allow to create with new bib record