Add purchase order line

End Point

'CreateOrUpdate' API end point is used to add products to the pickticket lines.

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

Headers

Name
Type
Description

ApiKey*

String

System API key

Request Body

Name
Type
Description

"ProductId"*

String

User assigned product SKU

"PurchaseOrderId"*

String

Purchase order Id assigned by the system

"OrderedQuantity"*

Float

Quantity of the chosen product to add

{
    "$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.0,
    "OutstandingQuantity": 2.0,
    "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 remove lines using API calls.

Notice: 'PurchaseOrderId' and 'ProductId' can be replaced by 'PurchaseOrderNumber' and 'SKU' respectively when dealing with purchase orders.