Skip to content

Offers and Inventory

Import offers and inventory data, create custom part offers and get a PCB offer.

Import Offers and Inventory

Request

Security
BearerAuth
Bodyapplication/jsonrequired

This endpoint allows importing of ERP offer and inventory data into Luminovo.

Types of Offers

There are two types of offers that can be imported:

1. Inventory Offers

For inventory offers (or simply your inventory), set supplier.type: "Internal". The supplier field should reference your inventory site location, which needs to be configured in advance in Luminovo (Settings -> Sites). If no supplier is specified, the default inventory site will be used.

2. Supplier Offers

For supplier offers, set supplier.type: "External". The supplier field should reference the actual supplier (e.g., "Mouser", "Arrow", etc.).

Updating Existing Offers

When importing offers, previously imported offers will be replaced if they are equivalent on the following fields:

  • part: internal_part_number or our resolved part through the given manufacturer and manufacturer_part_number
  • supplier: the resolved internal or external supplier through the given supplier or supplier_number.
  • supplier_part_number
  • customer: the resolved customer through the given name or number.
  • packaging
  • price_type
  • import_context
Array [
partInternal Part Number (object) or Manufacturer and Manufacturer Part Number (object)(Part)required
One of:

Specification of the part that a given offer or inventory is for. This can be either:

  • An internal part number (IPN) to identify parts of an ERP component. The IPN and attached component data needs to be uploaded separately through the components API for the offer or inventory to be accessible.
  • A manufacturer and manufacturer part number (MPN) to identify an off-the-shelf part. If no match or no unique match can be found for a given manufacturer and MPN, an error is returned for this offer or inventory item.
supplierobject(Supplier)required

The supplier of an offer, which can be either internal for an inventory offer, or external for an offer from a supplier. The location of the offer may be optionally given either through an inventory site or a stock location of a supplier.

customerobject(Customer)

This field can be given if an offer or inventory is restricted to a certain customer. If a customer name is also given in the input data, the following cases are handled:

  1. If the customer can be found by number, the customer name will not be updated. 2. If the customer cannot be found by number but it can be found by name, the customer number will be updated to the number provided. 3. If the customer does not yet exist, it will be created only if the number and name are provided.
price_typestring(Price type)

The price type of the offer. This field is optional. If not given, then in the external supplier case, a list price type is used, and in the internal supplier case, a standard price type is used.

Price Type Meanings:

  • List: Standard list price from the supplier (usually the highest price)
  • Contract: Negotiated contract price (usually better than list price)
  • Quote: Specific quote price for a particular order or customer
  • Purchase: Purchase price (what you actually paid)
  • Standard: Standard pricing (default pricing)
  • CustomerNegotiated: Price specifically negotiated with a customer
  • TargetPrice: Target price to beat or achieve
Enum:"List""Contract""Quote""Purchase""Standard""CustomerNegotiated""TargetPrice"
pricesArray of objects(Price break)required

A list of price breaks for a given offer or inventory. At least one price break needs to be given.

availabilityobject(Availability)required

The availability of an offer or inventory, giving stock values and lead times.

unit_of_measurementobject(Unit of measurement)

The unit of measurement for the unit price, as well as the quantities provided in available_stock and total_stock. If you do not provide this field then it defaults to 1 piece. If the part in your inventory is better measured in a different unit, you can set the unit of measurement here. For example, if your IPN refers to a cable roll, where each roll has 30 meters of cable, you could provide a quantity of 30 and unit of "Meter" for the unit_of_measurement. If you then specify your available_stock as 10, we will know that you have 300 meters of cable available. Additionally, if in this case your provided unit price is 20 EUR, then that would mean 20 EUR per 30 meters of cable.

packagingstring(Packaging)

The packaging for a part in an offer or inventory.

Enum:"AmmoPack""Bag""Bulk""Reel""ReReel""Spool""Tape""Tray""Tube""Carton"
valid_untilstring, (date)(Date)

A date until which the given offer is valid.

one_time_costsobject(Cost)

One-time costs for the offer, e.g. setup costs. This is optional and can be used to provide additional costs that are not covered by the unit price.

notesstring

Notes for the offer.

import_contextstring

Optional name that groups these offers under an offer import context, making it easy to find offers from the same import later. If no context with this name exists yet, one is created automatically with ApiIntegration origin; a name that already exists reuses that context. Contexts can be listed and managed via the Offer Import Context endpoints.

]
POST
/offers/import
curl -i -X POST \
  https://api.luminovo.com/offers/import \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "availability": {
        "available_stock": 5626,
        "lead_time": 254,
        "on_order": [
          {
            "date": "2023-12-24",
            "quantity": 1000
          },
          {
            "date": "2024-01-08",
            "quantity": 2000
          }
        ],
        "total_stock": 9386
      },
      "customer": {
        "name": "MyCustomer",
        "number": "9987"
      },
      "packaging": "Bag",
      "part": {
        "internal_part_number": "1000-10"
      },
      "prices": [
        {
          "moq": 1,
          "mpq": 10,
          "unit_price": {
            "amount": "0.0100",
            "currency": "EUR"
          }
        },
        {
          "moq": 100,
          "mpq": 10,
          "unit_price": {
            "amount": "0.0090",
            "currency": "EUR"
          }
        }
      ],
      "supplier": {
        "type": "Internal",
        "supplier": "Inventory Site",
        "supplier_number": "SITE-001",
        "supplier_part_number": "INV-EXT-SUP-NUMBER"
      },
      "unit_of_measurement": {
        "quantity": 0.1,
        "unit": "Kilogram"
      },
      "valid_until": "2030-04-01",
      "notes": "Example notes"
    }
  ]'

Responses

Response for importing new offer data

Bodyapplication/json
Array [
partInternal Part Number (object) or Manufacturer and Manufacturer Part Number (object)(Part)
One of:

Specification of the part that a given offer or inventory is for. This can be either:

  • An internal part number (IPN) to identify parts of an ERP component. The IPN and attached component data needs to be uploaded separately through the components API for the offer or inventory to be accessible.
  • A manufacturer and manufacturer part number (MPN) to identify an off-the-shelf part. If no match or no unique match can be found for a given manufacturer and MPN, an error is returned for this offer or inventory item.
keyobject

Optional key that can be used to track which request item corresponds to which response item. Echoed back from the request.

statusintegerrequired

Response status value. 200 for successfully created or updated offer or inventory items, 400 for bad requests, 422 for validation errors.

Enum:200400422
descriptionstringrequired

Human readable status description containing additional context information about the status, e.g. failure description.

error_codestring

Machine-readable error code for categorizing the type of error. Only present when status is not 200.

]
Response
The standard case when all offer items in the request were parsed and handled successfully.
[ { "part": {}, "status": 200, "description": "Created" }, { "part": {}, "status": 200, "description": "Created" } ]