Search Results for

    Show / Hide Table of Contents

    Product Purchase Prices

    Retrieve all purchase prices for a given product

    All existing purchase prices for a product can be retrieved using GET /api/Product/{idOrCode}/PurchasePrice.

    Reference: GET /api/Product/{idOrCode}/PurchasePrice

    Load a single purchase price

    An individual purchase price and be retrieved by its id:

    • GET /api/Product/PROD_PUR_CODE/PurchasePrice/e7b08c3e-877c-4d6e-1647-08dd347da426

    Reference: GET /api/Product/{productRef}/PurchasePrice/{priceId}

    Creating a new purchase price

    This is the minimal example to create a cost centre:

    POST /api/Product/{idOrCode}/PurchasePrice/

    {
      "quantityFrom": 1,
      "unitPrice": 5.00
    }
    

    This creates a new product purchase price against the selected purchase product.

    If not provided as part of the create request the following values will be defaulted:

    • currency will default to the value set in the environment defaults.
    • unitOfMeasureRef will default to the unit selected on the parent product.
    • effectiveDate will default to todays date.

    Complete example:

    This is a complete example that contains all supported fields.

    Note the codes might vary in your environment so be sure to consult the available reference catalogs in Iplicit or via the catalogs endpoints

    The unitOfMeasureRef must be a valid reference to a unit of measure as part of the unit group set on the parent product.

    POST /api/Product/{idOrCode}/PurchasePrice/

    {
      "currency": "GBP",
      "unitPrice": 10.00,
      "effectiveDate": "2025-01-01",
      "quantityFrom": 1,
      "quantityTo": 20,
      "unitOfMeasureRef": "Units.EA",
      "supplierRef": "SUPP1",
      "projectRef": "PROJ1"
    }
    

    Reference: POST /api/Product/{idOrCode}/PurchasePrice/

    Updating a purchase price

    The updating of a purchase price is done by patching: only the specified fields will be updated.

    Any section included in the patch will be completely replaced.

    PATCH /api/Product/{idOrCode}/PurchasePrice/{id}

    {
      "effectiveDate": "2025-02-01"
    }
    

    Reference: PATCH /api/Product/{idOrCode}/PurchasePrice/{id}

    Locking

    Locking (soft deleting) a purchase price:

    • POST /api/Product/{idOrCode}/PurchasePrice/{id}/lock

    Locked purchase prices have the isActive field set to false.

    Reference: POST /api/Product/{idOrCode}/PurchasePrice/{id}/lock

    Unlocking

    Unlocking a purchase price:

    • POST /api/Product/{idOrCode}/PurchasePrice/{id}/unlock

    Reference: POST /api/Product/{idOrCode}/PurchasePrice/{id}/unlock

    Deleting

    Deleting a purchase price completely removes it from the product:

    • DELETE /api/Product/{idOrCode}/PurchasePrice/{id}

    A purchase price does not need to be locked prior to deletion via the API.

    Reference: DELETE /api/Product/{productRef}/PurchasePrice/{priceId}



    Updated March 2024

    In this article
    Back to top Generated by DocFX