Edit purchase order line

End Point

'CreateOrUpdate' API end point is used to edit existing pick ticket lines.

POST https://{tenant_name}.p4warehouse.com/api/PickTicketLineApi/CreateOrUpdate

Headers

NameTypeDescription

ApiKey

String

System API key

Request Body

NameTypeDescription

"ProductId"*

String

Product Id assigned by the system

"Id"*

String

Line Id assigned by the system

"OrderedQuantity"*

Float

Quantity of the chosen product to add

"PurchaeOrderId"*

String

Purchase order Id assigned by the system

{
    "$id": "1",
    "LineNumber": 1,
    "PurchaseOrderId": "42e0ed2d-4b06-4af9-b132-b357ea0bfd1b",
    "PurchaseOrder": {
        "$id": "2",
        "PurchaseOrderNumber": "PO-0000039",
        "PurchaseOrderStateEnum": 0,
        "PurchaseOrderState": "Draft",
        "Carrier": null,
        "ReferenceNumber": null,
        "Reference1": null,
        "Reference2": null,
        "Reference3": null,
        "Container": null,
        "Comments": null,
        "CancelDate": null,
        "RequiredDate": null,
        "ReleaseDate": null,
        "ReceivingStarted": null,
        "ReceivingCompleted": null,
        "CloseDate": null,
        "UploadDate": null,
        "UploadedSuceeded": null,
        "UploadMessage": null,
        "AppointmentNumber": null,
        "AppointmentDate": null,
        "ParentBackOrderId": null,
        "ParentBackOrder": null,
        "BackOrders": null,
        "DockDoorId": null,
        "DockDoor": null,
        "WarehouseId": "1ab1f713-a451-4019-9e3c-25624374508c",
        "Warehouse": null,
        "ClientId": null,
        "Client": null,
        "VendorId": "a69a50b4-4116-4525-8d35-43be41822250",
        "Vendor": null,
        "IsWarehouseTransfer": false,
        "WarehouseTransferPickTicketId": null,
        "WarehouseTransferPickTicket": null,
        "Lines": [
            {
                "$ref": "1"
            }
        ],
        "AssignedUserId": null,
        "AssignedUser": null,
        "Tag1": null,
        "Tag2": null,
        "Tag3": null,
        "Tag4": null,
        "Tag5": null,
        "Info1": null,
        "Info2": null,
        "Info3": null,
        "Info4": null,
        "Info5": null,
        "Info6": null,
        "Info7": null,
        "Info8": null,
        "Info9": null,
        "Info10": null,
        "Id": "42e0ed2d-4b06-4af9-b132-b357ea0bfd1b",
        "DateCreated": "2023-08-24T15:50:21.051622+00:00",
        "TypeName": "Pro4Soft.TenantData.Entities.Business.Purchasing.PurchaseOrder",
        "TypeNameShort": "PurchaseOrder"
    },
    "ProductId": "eca6e721-9a16-4b61-b739-06a0f099f3d3",
    "Product": null,
    "ProductBundleId": null,
    "ProductBundle": null,
    "WarehouseTransferPickTicketLineId": null,
    "WarehouseTransferPickTicketLine": null,
    "Packsize": null,
    "NumberOfPacks": null,
    "LotNumber": null,
    "Instructions": null,
    "ReferenceNumber": null,
    "Reference1": null,
    "Reference2": null,
    "Reference3": null,
    "OrderedQuantity": 2.0,
    "ReceivedQuantity": 0.00,
    "OutstandingQuantity": 2.00,
    "LineDetails": [],
    "Info1": null,
    "Info2": null,
    "Info3": null,
    "Info4": null,
    "Info5": null,
    "Info6": null,
    "Info7": null,
    "Info8": null,
    "Info9": null,
    "Info10": null,
    "Id": "ab222a44-3220-482c-90e9-7d9dbf6c3900",
    "DateCreated": "2023-08-28T15:36:03.3900173+00:00",
    "TypeName": "Pro4Soft.TenantData.Entities.Business.Purchasing.PurchaseOrderLine",
    "TypeNameShort": "PurchaseOrderLine"
}

Newly created lines are assigned with 'Id' number. Use this number to edit lines using API calls.

Notice: Product ID and 'SKU' are interchangeable when dealing with pick ticket lines.

JSON Example

Here is an example of a JSON payload to edit existing purchase order lines with a product and ordered quantity.

{
    "Id":"ab222a44-3220-482c-90e9-7d9dbf6c3900",
    "OrderedQuantity": 2,
    "ProductId":"eca6e721-9a16-4b61-b739-06a0f099f3d3",
    "PurchaseOrderId":"42e0ed2d-4b06-4af9-b132-b357ea0bfd1b"
}