API

MRPEasy API

MRPEasy has a REST API, it is accessible in Unlimited pricing plan for paying clients. It allows to create new objects or view, update and delete them using standard methods:

Method: GET
Description:

Get an object if its ID is provided. For example, https://app.mrpeasy.com/rest/v1/items/1.

If no ID is provided, return a list of objects. For example, https://app.mrpeasy.com/rest/v1/items.

The maximum length of list is 100 objects at a time. If there are more than 100 objects in the database, response code will be 206 and response will include HTTP header Content-Range with indexes of the first and the last objects and total number of objects. Please note that the index of the last object is equal to the total number of objects minus 1.

In order to receive next objects from the list, your request should include HTTP header Range with index of the first object that should be returned.
To receive less than 100 objects, include HTTP header Range with indexes of the first and the last objects.

For example:

Content-Range: items 0-99/250 - response contains first 100 objects of 250.

Content-Range: items 200-249/250 - response contains last 50 objects of 250.

Range: 200 - request 100 objects starting from 201.
Range: 10-14 - request 5 objects starting from 11.

Response codes:

200 - object is found

200 - all elements of list are returned

206 - list is returned partially

400 - provided data did not pass the validation

404 - object is not found

Method: POST
Description:

Create a new object.

For example, request to https://app.mrpeasy.com/rest/v1/items creates a new stock item.

Data should be posted as HTTP POST data (application/x-www-form-urlencoded).

If object is created successfully, the response includes the ID of created object.

If provided data was not valid, the response includes array of validation errors.

Response codes:

201 - object is created successfully

400 - provided data did not pass the validation

Method: PUT
Description:

Updates existing object.

For example, request to https://app.mrpeasy.com/rest/v1/items/1 updates stock item.

Data should be posted as HTTP POST data (application/x-www-form-urlencoded).

If object is updated successfully, response has no content.

If provided data was not valid, the response includes array of validation errors.

Response codes:

202 - object is updated successfully

400 - provided data did not pass the validation

404 - object is not found

Method: DELETE
Description:

Deletes existing object.

For example, request to https://app.mrpeasy.com/rest/v1/items/1 updates stock item.

This method has no content in response.

Response codes:

204 - object is deleted successfully

400 - object cannot be deleted

404 - object is not found

Response data is JSON encoded.

Also, API can return the following codes:

  • 401 - Unauthorized. Please see section Authentication for details.
  • 429 - Too Many Requests. MRPEasy allows one request per client at a time. In this case please retry the same request after previous request is completed. Also, MRPEasy allows 100 requests per 10 seconds only.
  • 503 - MRPEasy is under maintenance. In this case please retry the same request later.

Authentication

Each request to MRPEasy REST API must contain HTTP headers:

  • api_key - your MRPEasy API key, that can be found in Settings - Integration - API access;
  • access_key - a secret key that can be defined in Settings - Integration - API access. Please note that it must be confidential. Never give it to anybody. We will never ask you for this key.
    We advise to change this key from time to time. If you do not need to do API requests all the time, we advise do delete it after each usage. Empty API access key disables API and it increases security.

For example:

Api_key: z1g41b3d0a7c2

Access_key: yT%"u(fad*N6j&L!8TQq^?^2K?wL*K

Objects

MRPEasy REST API provides the access to the following objects:

Bills of materials

https://app.mrpeasy.com/rest/v1/boms

Field Type Description
bom_id Integer, read-only Database ID of the BOM.
product_id Integer ID of the final product for this BOM. It can be defined only while creating a new BOM and cannot be changed later.
code String A unique number to identify the BOM.
title String Name of the BOM.
routings Array of integers IDs of routings that are suitable for this BOM.
components Array of objects

Array of BOM components.

If you create a new BOM, then you must provide components.

If you update existing BOM, you should provide either all components (both updated and not updated with their component IDs) or no components (existing components will remain).

If you provide components, then each component that has existing component ID will be updated, components without component ID will be created and old components that were not found by ID among provided ones will be deleted.

 
Components are objects with the following structure:
Field Type Description
component_id Integer, read-only Database ID of the component.
article_id Integer ID of the material.
relation_id Integer ID of the relation (if Matrix BOM functionality is turned on).
quantity Decimal Number of units that are needed to produce one unit of finished product.
description Text A free text
ord Integers A serial number of the component, starting with 1.

Customer orders

https://app.mrpeasy.com/rest/v1/customer-orders[?cust_ord_id=...&code=...]

Customer orders can be added and viewed. Only GET and POST methods are supported. Other methods are disabled.

Field Type Description
cust_ord_id Integer, read-only Database ID of the customer order.
This field can be added as a GET parameter to URL to filter customer orders list.
code String A unique number to identify the customer order.
This field can be added as a GET parameter to URL to filter customer orders list.
reference String Reference of the customer order.
This field can be added as a GET parameter to URL to filter customer orders list.
customer_id Integer Database ID of the customer.
This field can be added as a GET parameter to URL to filter customer orders list.
customer_code String, read-only A unique number to identify the customer.
This field can be added as a GET parameter to URL to filter customer orders list.
customer_name String, read-only A name of the customer.
This field can be added as a GET parameter to URL to filter customer orders list.
shipping_address_id Integer ID of customer order shipping address if it is selected in CO details.
This field can be added as a GET parameter to URL to filter customer orders list.
shipping_address String, read-only Shipping address as a text.
This field can be added as a GET parameter to URL to filter customer orders list.
If shipping_address_id is empty, then this is the default address of a customer. It was not selected manually in CO details.
status Integer Status of customer order.
  • 10 - Quotation
  • 20 - Waiting for confirmation
  • 30 - Confirmed
  • 40 - Waiting for production
  • 50 - In production
  • 60 - Ready for shipment
  • 70 - Shipped & invoiced
  • 80 - Delivered
  • 90 - Cancelled
This field can be added as a GET parameter to URL to filter customer orders list.
created Unix timestamp Date and time when this customer order was created.
GET parameters created_min and created_max can be added to URL to filter customer orders list.
delivery_date Unix timestamp Date and time when this customer order should be delivered.
GET parameters delivery_date_min and delivery_date_max can be added to URL to filter customer orders list.
total_price Decimal Total price of the customer order.
GET parameters total_price_min and total_price_max can be added to URL to filter customer orders list.
total_cost Decimal, read-only Total cost of the customer order. It is available if all products have been booked.
GET parameters total_cost_min and total_cost_max can be added to URL to filter customer orders list.
profit Decimal, read-only Difference between total_price and total_cost.
GET parameters profit_min and profit_max can be added to URL to filter customer orders list.
discount_percent Decimal Percentage of discount.
discount_sum Decimal, read-only Sum of discount.
notes String Internal notes, any additional information about the order.
delivery_terms String Delivery terms of the order.
products Array of objects Array of products that are sold.
 
Products are objects with the following structure:
Field Type Description
line_id Integer, read-only Database ID of the customer order line.
ord Integers A number of the product, starting with 1.
article_id Integer ID of the article.
description Text A free text.
quantity Decimal Number of items to sell.
shipped Decimal Number of shipped items.
item_price Decimal Price of one item.
total_price Decimal Price of product.
discount_percent Decimal Percentage of discount per line.
discount_sum Decimal, read-only Sum of discount per line.
cost Decimal, read-only Total cost of the product. It is available if the products has been booked.
profit Decimal, read-only Difference between total_price and cost.
part_status Integer, read-only Status of product booking:
  • 10 - Not booked
  • 20 - Delayed
  • 25 - Possibly delayed
  • 30 - Expected on time
  • 40 - Ready for shipment
  • 50 - Delivered
source Array, read-only Stock lots, from which products are booked.
The following fields are included:
  • lot_id
  • lot_code
  • lot_status
  • man_ord_id
  • manufacturing_order_code
  • manufacturing_order_status
  • pur_ord_id
  • purchase_order_code
  • purchase_order_status

To add a customer order, provide the following data:

  • customer_id;
  • products
    • article_id - whether article_id from MRPEasy database;
      sku - or SKU that must match part number in MRPEasy;
      product_id with param [parameter_id => value_id, parameter_id => value_id, ...] - or, if Matrix BOM is turned on, product_id from MRPEasy database with array of parameters.
    • quantity;
    • total_price

If customer order is created with status Confirmed (30) or greater, software tries to book available products from stock immediately. If customer order is created with status Shipped & invoiced (70) or Delivered (80), and products are booked, software creates a shipment document and picks products from the stock.

Customers

https://app.mrpeasy.com/rest/v1/customers[?code=...&title=...]

Customers can be added and viewed. Only GET and POST methods are supported. Other methods are disabled.

Field Type Description
customer_id Integer, read-only Database ID of the customer.
code String A unique number to identify the customer.
This field can be added as a GET parameter to URL to filter customers list.
title String Name of the customer.
This field can be added as a GET parameter to URL to filter customers list.
reg_nr String Registration number of customer's company.
This field can be added as a GET parameter to URL to filter customers list.
tax_nr String Tax/VAT number of customer's company.
This field can be added as a GET parameter to URL to filter customers list.
created Unix timestamp Date and time when this customer was created.
GET parameters created_min and created_max can be added to URL to filter customers list.
next_contact Unix timestamp Date and time when this customer should be contacted.
GET parameters next_contact_min and next_contact_max can be added to URL to filter customers list.
status Integer Status of customer. Statuses are configured in MRPEasy -> Settings -> System settings -> Customer statuses.
This field can be added as a GET parameter to URL to filter customers list.
payment_period Integer A default payment period in days for invoices to this customer.
user_id Integer Sales person who handles that customer.
language_id Integer Language of documents that are printed for this customer.
contact_data Array of objects Array of contact details.
 
Contact details are objects with the following structure:
Field Type Description
line_id Integer, read-only Database ID of the contact information.
type String Type of contact information:
  • phone
  • fax
  • skype
  • email
  • web
  • address
  • other
value String Contact information.

Manufacturing orders

https://app.mrpeasy.com/rest/v1/manufacturing-orders[?man_ord_id=...&code=...]

Manufacturing orders can be added and viewed. Only GET and POST methods are supported. Other methods are disabled.

Field Type Description
man_ord_id Integer, read-only Database ID of the manufacturing order.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
code String A unique number to identify the manufacturing order.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
article_id Integer, read-only Database ID of the stock item. If Matrix BOM is turned on, this is unique for each variation.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
product_id Integer, read-only Database product ID. If Matrix BOM is turned on, product_id is the same at all variations of the stock item.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
item_code String A unique number to identify the stock item.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
item_title String Name of the stock item.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
unit_id Integer or null ID of the unit of measurement.
unit String Unit of measurement.
group_id Integer or null ID of the product group.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
group_code String A unique number to identify the product group.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
group_title String Name of the product group.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
quantity Decimal Quantity of manufacturing order.
GET parameters quantity_min and quantity_max can be added to URL to filter manufacturing orders list.
status Integer Status of manufacturing order.
  • 10 - New
  • 20 - Scheduled
  • 30 - In progress
  • 35 - Paused
  • 40 - Done
  • 50 - Shipped
  • 60 - Closed
  • 70 - Cancelled
This field can be added as a GET parameter to URL to filter manufacturing orders list.
part_status Integer Status of parts that are booked.
  • 3 - Not booked
  • 2 - Delayed
  • 1 - Expected
  • 0 - Received
This field can be added as a GET parameter to URL to filter manufacturing orders list.
created Unix timestamp Date and time when this manufacturing order was created.
GET parameters created_min and created_max can be added to URL to filter manufacturing orders list.
due_date Unix timestamp Date and time when this manufacturing order should be ready.
GET parameters due_date_min and due_date_max can be added to URL to filter manufacturing orders list.
start_date Unix timestamp Date and time when this manufacturing order is started.
GET parameters start_date_min and start_date_max can be added to URL to filter manufacturing orders list.
finish_date Unix timestamp Date and time when this manufacturing order is finished.
GET parameters finish_date_min and finish_date_max can be added to URL to filter manufacturing orders list.
item_cost Decimal Cost per one stock item.
GET parameters item_cost_min and item_cost_max can be added to URL to filter manufacturing orders list.
total_cost Decimal Total cost of manufacturing order.
GET parameters total_cost_min and total_cost_max can be added to URL to filter manufacturing orders list.
assigned_id Integer User that is responsible for this manufacturing order.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
bom_id Integer ID of BOM.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
routing_id Integer ID of routing.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
lot_id Integer ID of target stock lot.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
lot_code String A unique number to identify the target lot.
This field can be added as a GET parameter to URL to filter manufacturing orders list.
site_id Integer ID of site where this manufacturing order is performed (only if enterprise function "Multiple Production Sites/Stocks" is used).
This field can be added as a GET parameter to URL to filter manufacturing orders list.
parts Array of objects Array of booked or consumed parts.
This field is included in the reply only when a particular MO is requested (https://app.mrpeasy.com/rest/v1/manufacturing-orders/[MO_ID]).
operations Array of objects Array of manufacturing operations.
This field is included in the reply only when a particular MO is requested (https://app.mrpeasy.com/rest/v1/manufacturing-orders/[MO_ID]).
notes Array of objects Array of notes of the manufacturing order.
This field is included in the reply only when a particular MO is requested (https://app.mrpeasy.com/rest/v1/manufacturing-orders/[MO_ID]).
 
Parts are objects with the following structure:
Field Type Description
writeoff_id Integer, read-only Database ID of the booking.
booking_code String A unique number of the booking.
article_id Integer ID of the article.
product_id Integer ID of the product.
booked Decimal Number of items that are booked.
consumed Decimal Number of items that are consumed.
lots Array of objects Array of stock lots.
 
Stock lots are objects with the following structure:
Field Type Description
lot_id Integer, read-only Database ID of the stock lot. NULL if the item is not booked from a particular stock lot.
code String A unique number of the stock lot. NULL if the item is not booked from a particular stock lot.
booked Decimal Number of items that are booked.
consumed Decimal Number of items that are consumed.
item_cost Decimal Cost per one stock item.
 
Operations are objects with the following structure:
Field Type Description
operation_id Integer, read-only Database ID of the operation.
ord Integers A number of the operation, starting with 1.
type_id Integer ID of the work station type.
vendor_id Integer ID of the sub-contractor.
description Text A description of the operation.
setup_time Integer Setup time from a routing in minutes.
cycle_time Integer Cycle time from a routing in minutes.
planned_start_date Unix timestamp Date and time when this operation should be started.
planned_finish_date Unix timestamp Date and time when this operation should be finished.
planned_duration Integer Planned duration of the operation.
real_start_date Unix timestamp Date and time when this operation was started. NULL if the operation is not started yet.
real_finish_date Unix timestamp Date and time when this operation was finished. NULL if the operation is not finished yet.
real_duration Integer Real duration of the operation. NULL if the operation is not finished yet.
manufacturing_cost Decimal Manufacturing overhead.
labour_cost Decimal Labour cost.
stations Array of objects Array of work stations.
 
Work stations are objects with the following structure:
Field Type Description
pws_id Integer, read-only Database ID of the work station in the operation.
station_id Integers Database ID of the work station.
code String A unique number of the work station.
title String Name of the work station.
planned_start_date Unix timestamp Date and time when this operation should be started.
planned_finish_date Unix timestamp Date and time when this operation should be finished.
planned_duration Integer Planned duration of the operation.
real_start_date Unix timestamp Date and time when this operation was started. NULL if the operation is not started yet.
real_finish_date Unix timestamp Date and time when this operation was finished. NULL if the operation is not finished yet.
real_duration Integer Real duration of the operation. NULL if the operation is not finished yet.
manufacturing_cost Decimal Manufacturing overhead.
workers Array of objects Array of worker.
 
Workers are objects with the following structure:
Field Type Description
worker_id Integer, read-only Database ID of the worker.
user_id Integers Database ID of the user.
department_id Integers Database ID of the department.
planned_start_date Unix timestamp Date and time when this operation should be started.
planned_finish_date Unix timestamp Date and time when this operation should be finished.
planned_duration Integer Planned duration of the operation.
real_start_date Unix timestamp Date and time when this operation was started. NULL if the operation is not started yet.
real_finish_date Unix timestamp Date and time when this operation was finished. NULL if the operation is not finished yet.
real_duration Integer Real duration of the operation. NULL if the operation is not finished yet.
labour_cost Decimal Labour cost.
results Array of objects Array of real results of the worker.
 
Results are objects with the following structure:
Field Type Description
result_id Integer, read-only Database ID of the result.
real_start_date Unix timestamp Date and time when this operation was started. NULL if the operation is not started yet.
real_finish_date Unix timestamp Date and time when this operation was finished. NULL if the operation is not finished yet.
real_duration Integer Real duration of the operation. NULL if the operation is not finished yet.
Quantity Decimal Number of ready items.
 
Notes are objects with the following structure:
Field Type Description
note_id Integer, read-only Database ID of the result.
created Unix timestamp Date and time when this note was created.
author_id Integer ID of the user who created that note.
author String Username of the user who created that note.
last_modified Unix timestamp Date and time when this note was modified the last time.
last_modifier_id Integer ID of the user who modified that note.
last_modifier String Username of the user who modified that note.
text Text Text of the note.

To add a manufacturing order, provide the following data:

  • article_id;
  • quantity;
  • assigned_id;
  • site_id (only if Enterprise function "Multiple Production Sites/Stocks" is used);
  • status - optional, if status is "New" (10) and Professional function "Unscheduled Manufacturing Orders" is used, workstations will not be booked.

Parameters

https://app.mrpeasy.com/rest/v1/parameters[?parameter_id=...&title=...]

Field Type Description
parameter_id Integer, read-only Database ID of the parameter.
title String Name of the parameter.
This field can be added as a GET parameter to URL to filter parameters list.
changes_quantity Boolean Shows if the parameter can change the quantities of raw materials in BOM.
values Array of objects Array of possible values.
 
Values are objects with the following structure:
Field Type Description
value_id Integer Database ID of the value.
code String A unique number to identify the value.
value String A name of the value.
selling_price Decimal Selling price adjustment of the value.
ord Integer A number of the value, starting with 1.

Product groups

https://app.mrpeasy.com/rest/v1/product-groups[?group_id=...&code=...]

Field Type Description
group_id Integer, read-only Database ID of the group.
code String A unique number to identify the group.
This field can be added as a GET parameter to URL to filter product groups list.
title String Name of the group.
This field can be added as a GET parameter to URL to filter product groups list.

Purchase orders

https://app.mrpeasy.com/rest/v1/purchase-orders[?pur_ord_id=...&code=...]

Purchase orders are read-only. Only GET method is supported. Other methods are disabled.

Field Type Description
pur_ord_id Integer, read-only Database ID of the purchase order.
This field can be added as a GET parameter to URL to filter purchase orders list.
code String A unique number to identify the purchase order.
This field can be added as a GET parameter to URL to filter purchase orders list.
vendor_id Integer Database ID of the vendor.
This field can be added as a GET parameter to URL to filter purchase orders list.
vendor_code String, read-only A unique number to identify the vendor.
This field can be added as a GET parameter to URL to filter purchase orders list.
vendor_title String, read-only A name of the vendor.
This field can be added as a GET parameter to URL to filter purchase orders list.
status Integer Status of purchase order.
  • 10 - New
  • 20 - Ordered
  • 30 - Shipped
  • 40 - Received
  • 120 - Cancelled
This field can be added as a GET parameter to URL to filter purchase orders list.
created Unix timestamp Date and time when this purchase order was created.
GET parameters created_min and created_max can be added to URL to filter purchase orders list.
expected_date Unix timestamp Date and time when this purchase order should be received.
GET parameters expected_date_min and expected_date_max can be added to URL to filter purchase orders list.
due_date Unix timestamp Due date of the purchase order.
GET parameters due_date_min and due_date_max can be added to URL to filter purchase orders list.
shipped_date Unix timestamp Actual shipment date of the purchase order.
GET parameters shipped_date_min and shipped_date_max can be added to URL to filter purchase orders list.
arrival_date Unix timestamp Actual arrival date and time of the purchase order.
GET parameters arrival_date_min and arrival_date_max can be added to URL to filter purchase orders list.
order_number String Order number that is received from the vendor.
This field can be added as a GET parameter to URL to filter purchase orders list.
order_date Unix timestamp Vendor order's date.
GET parameters order_date_min and order_date_max can be added to URL to filter purchase orders list.
invoice_number String Invoice number that is received from the vendor.
This field can be added as a GET parameter to URL to filter purchase orders list.
invoice_date Unix timestamp Vendor invoice's date.
GET parameters invoice_date_min and invoice_date_max can be added to URL to filter purchase orders list.
total_price Decimal Total price of the purchase order in the default currency.
GET parameters total_price_min and total_price_max can be added to URL to filter purchase orders list.
vendor_price Decimal Total price of the purchase order in vendor's currency.
fees_taxable Decimal Taxable fees of the purchase order in the default currency.
vendor_fees_taxable Decimal Taxable fees of the purchase order in vendor's currency.
fees Decimal Additional fees of the purchase order in the default currency.
vendor_fees Decimal Additional fees of the purchase order in vendor's currency.
tax_percent Decimal Tax percentage.
tax Decimal Tax sum of the purchase order in the default currency.
vendor_tax Decimal Tax sum of the purchase order in vendor's currency.
discount_percent Decimal Discount percentage.
discount Decimal Discount sum of the purchase order in the default currency.
vendor_discount Decimal Discount sum of the purchase order in vendor's currency.
currency String Vendor's currency.
currency_rate Decimal Vendor's currency rate.
free_text Text A free text.
products Array of objects Array of products that are ordered.
 
Products are objects with the following structure:
Field Type Description
line_id Integer, read-only Database ID of the purchase order line.
ord Integers A number of the product, starting with 1.
article_id Integer Database ID of the stock item.
product_id Integer Database product ID.
item_code String A unique number to identify the stock item.
item_title String Name of the stock item.
description String A free text.
unit_id Integer or null ID of the unit of measurement.
unit String Unit of measurement.
group_id Integer or null ID of the product group.
group_code String A unique number to identify the product group.
group_title String Name of the product group.
quantity Decimal Number of products purchased in the default unit.
vendor_quantity Decimal Number of products purchased in the vendor's custom unit of measurement.
vendor_unit String Vendor's custom unit of measurement.
total_price Decimal Total price of the purchase order line in the default currency.
vendor_price Decimal Total price of the purchase order line in vendor's currency.
fees_taxable Decimal Taxable fees of the purchase order line in the default currency.
vendor_fees_taxable Decimal Taxable fees of the purchase order line in vendor's currency.
fees Decimal Additional fees of the purchase order line in the default currency.
vendor_fees Decimal Additional fees of the purchase order line in vendor's currency.
tax Decimal Tax sum of the purchase order line in the default currency.
vendor_tax Decimal Tax sum of the purchase order line in vendor's currency.
discount Decimal Discount sum of the purchase order line in the default currency.
vendor_discount Decimal Discount sum of the purchase order line in vendor's currency.

Relations

https://app.mrpeasy.com/rest/v1/relations[?relation_id=...&code=...]

Field Type Description
relation_id Integer, read-only Database ID of the relation.
code String A unique number to identify the relation.
This field can be added as a GET parameter to URL to filter relations list.
title String Name of the relation.
This field can be added as a GET parameter to URL to filter relations list.
lines Array of objects Array of possible parameter values and articles.
This field is included in the reply only when a particular relation is requested (https://app.mrpeasy.com/rest/v1/relations/[ID]).
 
Lines are objects with the following structure:
Field Type Description
line_id Integer Database ID of the line.
article_id Integer Database ID of the stock item.
ord Integers A number of the product, starting with 1.
values Array of objects Object that defines parameter values. Object has the following keys:
  • parameter_id
  • value_id

Routings

https://app.mrpeasy.com/rest/v1/routings

Field Type Description
routing_id Integer, read-only Database ID of the routing.
product_id Integer ID of the final product for this routing. It can be defined only while creating a new routing and cannot be changed later.
code String A unique number to identify the routing.
title String Name of the routing.
boms Array of integers IDs of BOMs that are suitable for this routing.
operations Array of objects

Array of routing operations.

If you create a new routing, then you must provide operations.

If you update existing routing, you should provide either all operations (both updated and not updated with their operation IDs) or no operations (existing operations will remain).

If you provide operations, then each operation that has existing operation ID will be updated, operations without operation ID will be created and old operations that were not found by ID among provided ones will be deleted.

 
Operations are objects with the following structure (for a better explanation please see Quick help in the software):
Field Type Description
operation_id Integer, read-only Database ID of the operation.
type_id Integer ID of the work center type.
ord Integers A serial number of the component, starting with 1.
description Text A free text.
fixed_time Decimal A time in minutes that is needed to start the operation (this time does not depend on the quantity of finished products).
variable_time Decimal Additional time of each finished product in minutes.
fixed_cost Decimal A cost of starting the operation that does not depend on the quantity of finished products.
variable_cost Decimal Additional cost of each finished product.
variable_quantity Decimal A quantity of finished products that are produced simultaneously.
time_payment Boolean Shows if user receives a salary per working time.
piece_payment Decimal If defined, then user receives a payment per each piece of finished product.
sequence Array of integers An array of ord values of operations that must be finished before current operation can start (first operation must have sequence 0).
overlap Decimal or null
If the current operation starts before previous operation is fully finished, you can define the quantity of products that must be ready before this operation can start.

Serial numbers

https://app.mrpeasy.com/rest/v1/serials[?serial_id=...&serial=...]

Serial numbers are read-only. Only GET method is supported. Other methods are disabled.

Field Type Description
serial_id Integer, read-only Database ID of the serial number.
This field can be added as a GET parameter to URL to filter serial numbers list.
serial String Serial number.
This field can be added as a GET parameter to URL to filter serial numbers list.
article_id Integer, read-only Database ID of the stock item. If Matrix BOM is turned on, this is unique for each variation.
This field can be added as a GET parameter to URL to filter serial numbers list.
product_id Integer, read-only Database product ID. If Matrix BOM is turned on, product_id is the same at all variations of the stock item.
This field can be added as a GET parameter to URL to filter serial numbers list.
item_code String A unique number to identify the stock item.
This field can be added as a GET parameter to URL to filter serial numbers list.
item_title String Name of the stock item.
This field can be added as a GET parameter to URL to filter serial numbers list.
group_id Integer or null ID of the product group.
This field can be added as a GET parameter to URL to filter serial numbers list.
group_code String A unique number to identify the product group.
This field can be added as a GET parameter to URL to filter serial numbers list.
group_title String Name of the product group.
This field can be added as a GET parameter to URL to filter serial numbers list.
status Integer Status of serial number.
  • 10 - Planned
  • 20 - Received
  • 30 - Consumed
  • 40 - Shipped
  • 50 - Written off
  • 60 - Returned
  • 70 - RMA
  • 80 - Rejected
This field can be added as a GET parameter to URL to filter serial numbers list.
lot_id Integer ID of serial number's stock lot.
This field can be added as a GET parameter to URL to filter serial numbers list.
lot_code String Unique code of serial number's stock lot.
This field can be added as a GET parameter to URL to filter serial numbers list.
cust_ord_id Integer If the item with this serial number has been shipped, show the database ID of the customer order.
This field can be added as a GET parameter to URL to filter serial numbers list.
customer_order_code String If the item with this serial number has been shipped, show the customer order number.
This field can be added as a GET parameter to URL to filter serial numbers list.
customer_order_created Unix timestamp Date and time when the customer order was created.
GET parameters customer_order_created_min and customer_order_created_max can be added to URL to filter serial numbers list.
rma_ord_id Integer If the item with this serial number was received in RMA order, show the database ID of the RMA order.
This field can be added as a GET parameter to URL to filter serial numbers list.
rma_order_code String If the item with this serial number was received in RMA order, show the RMA order number.
This field can be added as a GET parameter to URL to filter serial numbers list.
customer__id Integer If the item with this serial number has been shipped, show the database ID of the customer.
This field can be added as a GET parameter to URL to filter serial numbers list.
customer_code String If the item with this serial number has been shipped, show the customer number.
This field can be added as a GET parameter to URL to filter serial numbers list.
customer_name String If the item with this serial number has been shipped, show the customer name.
This field can be added as a GET parameter to URL to filter serial numbers list.
site_id Integer ID of site where this serial number is located (only if enterprise function "Multiple Production Sites/Stocks" is used).
This field can be added as a GET parameter to URL to filter serial numbers list.

Stock items

https://app.mrpeasy.com/rest/v1/items[?article_id=...&code=...]

Field Type Description
article_id Integer, read-only

Database ID of the stock item. If Matrix BOM is turned on, this is unique for each variation.
article_id can be seen in URL of stock item's reports page (https://app.mrpeasy.com/articles/stats/[article_id]).

This field can be added as a GET parameter to URL to filter stock items list.

product_id Integer, read-only

Database product ID. If Matrix BOM is turned on, product_id is the same at all variations of the stock item.
product_id can be seen in URL of stock item's details page (https://app.mrpeasy.com/articles/view/[product_id]).

This field can be added as a GET parameter to URL to filter stock items list.

code String

A unique number to identify the item. If Matrix BOM is turned on, it is same for all variations.

This field can be added as a GET parameter to URL to filter stock items list.

title String

Name of the item. If Matrix BOM is turned on, it is same for all variations.

This field can be added as a GET parameter to URL to filter stock items list.

unit_id Integer or null

ID of the unit of measurement. If Matrix BOM is turned on, it is same for all variations.

This field can be added as a GET parameter to URL to filter stock items list.

group_id Integer or null

ID of the product group. If Matrix BOM is turned on, it is same for all variations.

This field can be added as a GET parameter to URL to filter stock items list.

group_code String, read-only A unique number to identify the product group.
This field can be added as a GET parameter to URL to filter stock items list.
group_title String, read-only Name of the product group.
This field can be added as a GET parameter to URL to filter stock items list.
is_raw Boolean

Shows if this is a raw material that is bought from vendors. If Matrix BOM is turned on, it is same for all variations.

This field can be added as a GET parameter to URL to filter stock items list.

selling_price Decimal or array or null If you sell this item, enter a selling price. Array is returned if tiered prices are defined for the product. If Matrix BOM is turned on, it is same for all variations.
GET parameters selling_price_min and selling_price_max can be added to URL to filter stock items list.
avg_cost Decimal or null Approximate cost of the item. Please check the documentation about how the cost of items is calculated.
GET parameters avg_cost_min and avg_cost_max can be added to URL to filter stock items list.
in_stock
Decimal, read-only Total physical quantity in stock right now (available + booked).
GET parameters in_stock_min and in_stock_max can be added to URL to filter stock items list.
available Decimal, read-only Quantity, which is in stock and available.
GET parameters available_min and available_max can be added to URL to filter stock items list.
booked Decimal, read-only Quantity, which is in stock and booked, not freely available.
GET parameters booked_min and booked_max can be added to URL to filter stock items list.
expected_total Decimal, read-only Total quantity which is planned to be received in the future.
GET parameters expected_total_min and expected_total_max can be added to URL to filter stock items list.
expected_available Decimal, read-only Quantity, which is expected and available, not booked yet.
GET parameters expected_available_min and expected_available_max can be added to URL to filter stock items list.
expected_booked Decimal, read-only Quantity, which is expected and already booked, not freely available.
GET parameters expected_booked_min and expected_booked_max can be added to URL to filter stock items list.
min_quantity Decimal or array The minimal inventory level of the item.
If the enterprise function "Multiple Production Sites/Stocks" is disabled, this is a number.
Otherwise,
  • when requesting a list of items, this is a number at the site, which is selected by the optional site_id parameter (default: 1).
  • when requesting a particular item, this is an array with min. stock values for every site.
deleted Boolean Shows if this item is deleted.
This field can be added as a GET parameter to URL to filter stock items list.
purchase_terms Array of objects Array of purchase terms.
parameters Array of objects If Matrix BOM is turned on, this field contains array of parameters:
  • parameter_id - database ID of the parameter
  • ord - order of the parameter in product details
  • title - name of parameter
 
Purchase terms are read-only. They are objects with the following structure:
Field Type Description
vendor_id Integer Database ID of the vendor.
vendor_code String A unique number to identify the vendor.
vendor_title String A name of the vendor.
vendor_product_code String Item number in vendor's database.
priority Decimal Priority of this vendor compared with other vendors that supply the same stock item (as a number, higher number means higher priority).
lead_time Integer How many days it takes for the purchase order to arrive from the vendor to your stock.
unit String Units, which are used to purchase the item. Can be whether item's unit or vendor's custom unit.
unit_rate Decimal If a vendor has a custom unit, this is a conversion rate.
min_quantity Decimal Minimum quantity of purchase order in item's units.
vendor_min_quantity Decimal Minimum quantity of purchase order in vendor's units.
price Decimal Price per one unit in the main currency (in vendor's unit, if it is used).
currency_price Decimal Price per one unit in vendor's currency.
currency String Vendor's currency.

Stock lots

https://app.mrpeasy.com/rest/v1/lots[?lot_id=...&code=...]

Stock lots are read-only. Only GET method is supported. Other methods are disabled.

Field Type Description
lot_id Integer, read-only Database ID of the stock lot.
This field can be added as a GET parameter to URL to filter stock lots list.
code String A unique number to identify the stock lot.
This field can be added as a GET parameter to URL to filter stock lots list.
article_id Integer, read-only Database ID of the stock item. If Matrix BOM is turned on, this is unique for each variation.
This field can be added as a GET parameter to URL to filter stock lots list.
product_id Integer, read-only Database product ID. If Matrix BOM is turned on, product_id is the same at all variations of the stock item.
This field can be added as a GET parameter to URL to filter stock lots list.
item_code String A unique number to identify the stock item.
This field can be added as a GET parameter to URL to filter stock lots list.
item_title String Name of the stock item.
This field can be added as a GET parameter to URL to filter stock lots list.
unit_id Integer or null ID of the unit of measurement.
unit String Unit of measurement.
group_id Integer or null ID of the product group.
This field can be added as a GET parameter to URL to filter stock lots list.
group_code String A unique number to identify the product group.
This field can be added as a GET parameter to URL to filter stock lots list.
group_title String Name of the product group.
This field can be added as a GET parameter to URL to filter stock lots list.
status Integer Status of stock lot.
  • 10 - Planned
  • 15 - On hold
  • 20 - Received
  • 25 - Rejected
  • 30 - Cancelled
This field can be added as a GET parameter to URL to filter stock lots list.
created Unix timestamp Date and time when this stock lot was created.
GET parameters created_min and created_max can be added to URL to filter stock lots list.
available_from Unix timestamp Date and time when this stock lot becomes available.
GET parameters available_from_min and available_from_max can be added to URL to filter stock lots list.
quantity Decimal Initial quantity of stock lot.
GET parameters quantity_min and quantity_max can be added to URL to filter stock lots list.
available Decimal Quantity of stock items that are available for booking.
GET parameters available_min and available_max can be added to URL to filter stock lots list.
booked Decimal Quantity of stock items that are booked.
GET parameters booked_min and booked_max can be added to URL to filter stock lots list.
item_cost Decimal Cost per one stock item.
GET parameters item_cost_min and item_cost_max can be added to URL to filter stock lots list.
total_cost Decimal Total cost of stock lot.
GET parameters total_cost_min and total_cost_max can be added to URL to filter stock lots list.
pur_ord_id Integer or null ID of purchase order if this stock lot was purchased.
This field can be added as a GET parameter to URL to filter stock lots list.
purchase_order_code String or null Number of purchase order if this stock lot was purchased.
This field can be added as a GET parameter to URL to filter stock lots list.
man_ord_id Integer or null ID of manufacturing order if this stock lot was produced.
This field can be added as a GET parameter to URL to filter stock lots list.
manufacturing_order_code String or null Number of manufacturing order if this stock lot was produced.
This field can be added as a GET parameter to URL to filter stock lots list.
transfer_id Integer or null ID of transfer order if this stock lot was transfered from one site to another (only if enterprise function "Multiple Production Sites/Stocks" is used).
This field can be added as a GET parameter to URL to filter stock lots list.
transfer_order_code String or null Number of transfer order if this stock lot was transfered from one site to another (only if enterprise function "Multiple Production Sites/Stocks" is used).
This field can be added as a GET parameter to URL to filter stock lots list.
site_id Integer ID of site where this stock lot is located (only if enterprise function "Multiple Production Sites/Stocks" is used).
This field can be added as a GET parameter to URL to filter stock lots list.
locations Array of objects List of storage locations, where items from this lot are placed.
 
Locations are objects with the following structure:
Field Type Description
location_id Integer Database ID of the storage location.
location String Name of the storage location.
available Decimal Quantity of stock items that are available for booking.
booked Decimal Quantity of stock items that are booked.

Units of measurement

https://app.mrpeasy.com/rest/v1/units

Field Type Description
unit_id Integer, read-only Database ID of the unit of measurement.
title String Name of the unit of measurement.

User actions

https://app.mrpeasy.com/rest/v1/users/actions[?log_id=...&created_min=...]

User actions are read-only. Only GET method is supported. Other methods are disabled.

Field Type Description
log_id Integer, read-only Database ID of the action.
This field can be added as a GET parameter to URL to filter actions list.
created Unix timestamp Date and time when this action was made.
GET parameters created_min and created_max can be added to URL to filter actions list.
user_id Integer Database ID of the user.
This field can be added as a GET parameter to URL to filter actions list.
username String User name of the user.
object_id Integer Database ID of the target object.
This field can be added as a GET parameter to URL to filter actions list.
activity Integer Unique number of the activity.
This field can be added as a GET parameter to URL to filter actions list.
desciption String Text description of the activity.
comment String Additonal comment about the action.
This field can be added as a GET parameter to URL to filter actions list.

It is possible to get a list of all possible activities by making a GET request to https://app.mrpeasy.com/rest/v1/users/actions/list.

Work station types

https://app.mrpeasy.com/rest/v1/work-center-types

Field Type Description
type_id Integer, read-only Database ID of the type.
code String A unique number to identify the work center type.
title String Name of the work center type.

Work stations

https://app.mrpeasy.com/rest/v1/work-centers

Field Type Description
center_id Integer, read-only Database ID of the type.
type_id Integer ID of the wotk center type.
code String A unique number to identify the work center.
title String Name of the work center.

Inventory

To fetch inventory, make a GET request to https://app.mrpeasy.com/rest/v1/stock/inventory. This returns a list of stock items with on hand quantities and costs.

To fetch inventory at a specific date, add a DATE parameter to request URL (for example, https://app.mrpeasy.com/rest/v1/stock/inventory?date=2016-01-01).

To fetch on hand quantity of a particular stock item, use request URL https://app.mrpeasy.com/rest/v1/stock/inventory/[article_id] (replace [article_id] with a number).

To get a total cost of inventory make a request to URL https://app.mrpeasy.com/rest/v1/stock/inventory/sum. A DATE parameter can be used to receive total cost at a specific date.

Reports

MRPEasy API provides access to some reports.

To fetch a report, make a GET request to https://app.mrpeasy.com/rest/v1/report/[REPORT_TYPE].

The default period for reports is current month. You can adjust the period by setting dates like https://app.mrpeasy.com/rest/v1/report/[REPORT_TYPE]?from=2016-01-01&to=2016-01-31. Maximum period length is one month.

The following reports are available:

Type Description
production/products Get a production plan by products (planned finish date is within the period).
production/coproducts Get a list of co-products that were made during the period.
production/operations Get a list of manufacturing operations that are planned for the period (planned finish date is within the period).

Sample request:

https://app.mrpeasy.com/rest/v1/report/production/products?from=2016-01-01&to=2016-01-31.

Sample response:

Object (
[from] => 2016-01-01
[to] => 2016-01-31
[report] => production/products
[data] => Array (...)
)

Code sample

Download a sample API client in PHP.

If cUrl is not configured to validate SSL cetrificates, please uncomment lines 279 and 280.