MKG API Production Orders
Tested on API V3 and MKG Version 005.91.014.
|
Table of Contents |
|
Data Dictionary |
|
Postman |
Retrieve
|
Creditor |
|
Article |
Production Order Header List
To retrieve a list of production orders, the following call can be used. A filter is available to exclude or include historical records:
GET {{restUrl}}/Documents/prdh?Filter=prdh_historisch = false&FieldList=admi_num,prdh_num,mkg_grbv_prdh
{{restUrl}}/Documents/prdh?Filter=prdh_historisch = false&FieldList=admi_num,prdh_num,mkg_grbv_prdh
Search Production Order Header
To retrieve a specific production order, the following call can be used:
GET {{restUrl}}/Documents/prdh?Filter=Search = "0013"&NumRows=10&FieldList=admi_num,prdh_num,mkg_grbv_prdh
{{restUrl}}/Documents/prdh?Filter=Search = "0013"&NumRows=10&FieldList=admi_num,prdh_num,mkg_grbv_prdh
Production Order Line
To retrieve all production order lines under a production order, the following call can be used. If you want to retrieve a specific line, you can provide the line number with the filter prdr_num=1:
GET {{restUrl}}/Documents/prdr/?Filter=prdh_num = "60210013"&FieldList=prdr_num,prdr_oms_1
{{restUrl}}/Documents/prdr/?Filter=prdh_num = "60210013"&FieldList=prdr_num,prdr_oms_1
Production Order Material
To retrieve production order material, the following call can be used:
GET {{restUrl}}/Documents/prdr/1+{{prdh_num}}+{{prdr_num}}/prdr_prmv/{{prmv_num}}?FieldList=prdh_num,prdr_num,prmv_num,vrdg_num,prmv_kostprijs,prmv_adviesprijs,prmv_totaal_prijs
{{restUrl}}/Documents/prdr/1+{{prdh_num}}+{{prdr_num}}/prdr_prmv/{{prmv_num}}?FieldList=prdh_num,prdr_num,prmv_num,vrdg_num,prmv_kostprijs,prmv_adviesprijs,prmv_totaal_prijs
Production Order Operation
To retrieve a production order operation, the following call can be used:
GET {{restUrl}}/Documents/prdr/1+{{prdh_num}}+{{prdr_num}}/prdr_prbv/{{prbvnum}}?FieldList=prdh_num,prdr_num,prbv_num,prbv_bew_tarief_advies,prbv_bew_tarief_netto,prbv_bew_kostprijs
{{restUrl}}/Documents/prdr/1+{{prdh_num}}+{{prdr_num}}/prdr_prbv/{{prbvnum}}?FieldList=prdh_num,prdr_num,prbv_num,prbv_bew_tarief_advies,prbv_bew_tarief_netto,prbv_bew_kostprijs
Create
Production Order Header
To create a production order, no creditor needs to be created to which it is linked. When you create just a standalone production order, it will not be marked for a customer by default. This ensures that the production order is produced for inventory.
POST {{restUrl}}/Documents/prdh
{{restUrl}}/Documents/prdh
Request body:
{
"request": {
"InputData": {
"prdh": [
{
"admi_num": {{admi_num}},
"cred_num": {{cred_num}},
"prdh_oms_1": "Description",
"iorh_ref_uw": "Creditor reference",
"iorh_ordernummer_extern": "Customer order code",
"prdh_dat_order": "31-12-2025",
"prdh_dat_planning": "31-12-2025"
}
]
}
}
}
Production Order Line
To create a production order line, a production order must be created to which it is linked. This production order is linked with the variable {{prdh_num}}.
POST {{restUrl}}/Documents/prdh/{{prdh_num}}/prdh_eindproduct/
{{restUrl}}/Documents/prdh/{{prdh_num}}/prdh_eindproduct/
Request body:
{
"request": {
"InputData": {
"prdr": [
{
"admi_num": {{admi_num}},
"arti_code": "Article",
"prdr_oms_1": "Sales order line",
"prdr_aantal": 100,
"eenh_code": "pcs."
}
]
}
}
}
Production Order Material
To create production material, a production order and production order line must be created to which it is linked. This is linked with the variables {{prdh_num}} + {{prdr_num}}.
POST {{restUrl}}/Documents/prdr/{{prdh_num}}+{{prdr_num}}/prdr_prmv
{{restUrl}}/Documents/prdr/{{prdh_num}}+{{prdr_num}}/prdr_prmv
Request body:
{
"request": {
"InputData": {
"prmv": [
{
"admi_num": {{admi_num}},
"prmv_oms_1": "API material test",
"cred_num": {{crednum}}
}
]
}
}
}
Production Order Operations
To create a production order operation, a production order and production order line must be created to which it is linked. This is linked with the variables {{prdh_num}} {{prdr_num}}.
POST {{restUrl}}/Documents/prdr/{{prdh_num}}+{{prdr_num}}/prdr_prbv
{{restUrl}}/Documents/prdr/{{prdh_num}}+{{prdr_num}}/prdr_prbv
Request body:
{
"request": {
"InputData": {
"prbv": [
{
"admi_num": {{admi_num}},
"bwrk_num": 1000,
"prbv_tijd_per_stuk": 60
}
]
}
}
}
Actions
Accept Production Order Line
In MKG, it is possible to accept a production order line. This can only be done for one line at a time. Accepting a production order line ensures that this line is recorded and accepted. The line is thereby approved and ready for production.
To accept a production order line, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_accepteren
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_accepteren
Create Purchase Order
If you have a production order line, it is also possible to create a purchase order if not all required materials are available for production.
To create a purchase order for a production order line, use the following call:
PUT{{restUrl}}/Documents/prmv/{{admi_num}}+{{prdh_num}}+{{prdr_num}}+{{prmv_num}}/Service/s_createpurchaseorder
{{restUrl}}/Documents/prmv/{{admi_num}}+{{prdh_num}}+{{prdr_num}}+{{prmv_num}}/Service/s_createpurchaseorder
Create Backflush
Backflushing in an ERP system is a method to simplify the administration of material consumption by automatically assigning costs and inventory reduction after a production order is completed.
To perform a backflush, use the following call:
PUT{{restUrl}}/Documents/prmv/{{admi_num}}+{{prdh_num}}+{{prdr_num}}+{{prmv_num}}/Service/CreateBackflush
{{restUrl}}/Documents/prmv/{{admi_num}}+{{prdh_num}}+{{prdr_num}}+{{prmv_num}}/Service/CreateBackflush
Start Production
To start production of one production order line, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_in_productie
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_in_productie
Picklist
To start a picklist for a production order line, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_picklist
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_picklist
Request body:
{
"request": {
"InputData": {
"PickListAction": [
{
"t_dat_uitgifte": "{{TodayReverse}}",
"mgub_num": "MA230010",
"t_uitgeven": true,
"t_memo": "Memo Picklist",
"t_afgewerkt": true,
"RowKey": "x"
}
]
}
}
}
Report Picklist
To report the picklist, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_terugmelden_picklist
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_terugmelden_picklist
Request body:
{
"request": {
"InputData": {
"PickListAction": [
{
"t_dat_uitgifte": "{{TodayReverse}}",
"mgub_num": "MA230010",
"t_memo": "Report Picklist",
"RowKey": "x"
}
]
}
}
}
Plan
To plan the production of one production order line, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_plannen
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_plannen
Release Planning
To release the planning of one production order line, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_vrijgeven
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_vrijgeven
Reschedule Order
To reschedule one production order line, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_herplan_order
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_herplan_order
Request body:
{
"request": {
"InputData": {
"ReSchedule": [
{
"Rowkey": 1,
"t_planorder_methode": 2,
"t_cap_methode": 0,
"t_plan_richting": 0,
"t_bucket_methode": 1,
"t_optimaliseren": false
}
]
}
}
}
Create Reservation
To create a reservation of material for a production order line, use the following call:
PUT{{restUrl}}/Documents/prmv/{{admi_num}}+{{prdh_num}}+{{prdr_num}}+{{prmv_num}}/Service/s_createreservation
{{restUrl}}/Documents/prmv/{{admi_num}}+{{prdh_num}}+{{prdr_num}}+{{prmv_num}}/Service/s_createreservation
Request body:
{
"request": {
"InputData": {
"Reservation": [
{
"t_eenh_reservering": "pcs.",
"t_afgewerkt": true,
"t_uitgeven": false,
"t_uitgifte_datum": "2023-04-06",
"RowKey": 1
}
],
"StockAvailableList": [
{
"RowKey": 1,
"t_ingave": 1,
"t_link_aantal": 1,
"t_pamt_row": "0x0000000003c14e6d"
}
]
}
}
}
Delete Reservation
To delete a reservation of material for a production order line, use the following call:
PUT{{restUrl}}/Documents/prmv/0/Service/s_deletereservations
{{restUrl}}/Documents/prmv/0/Service/s_deletereservations
Request body:
{
"request": {
"InputData": {
"t_selected_rows": [
{
"t_value": "0x00000000000b24a0"
},
{
"t_value": "0x00000000000b2503"
}
]
}
}
}
Report Production Completion
When a production order line is complete, it can be reported as completed. You have the option to report one line as completed or multiple lines at once.
To report one production order line as completed, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_aantal_gereed?FieldList=part.part_num
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_aantal_gereed?FieldList=part.part_num
Request body:
{
"request": {
"InputData": {
"prdr": [
{
"RowKey": 1,
"t_verwerk_aantal": 10,
"t_verwerk_datum": "2022-07-27",
"t_part_id": "{{$randomUUID}}",
"t_part_magl": "{{magl_code}}",
"t_part_memo": "memo"
}
]
}
}
}
To report multiple production order lines as completed, use the following call:
PUT{{restUrl}}/Documents/prdr/x/Service/s_actie_aantal_gereed?Fieldlist=part.part_num
{{restUrl}}/Documents/prdr/x/Service/s_actie_aantal_gereed?Fieldlist=part.part_num
Request body:
{
"request": {
"InputData": {
"prdr": [
{
"RowKey": "x",
"t_verwerk_datum": "2023-12-13"
}
],
"t_selected_rows": [
{
"t_value": "1+60142337+1"
},
{
"t_value": "1+60142337+2"
}
]
}
}
}
Report Financial Completion
When a production order line is fully completed, you can report it as financially completed. This can only be done per production order line and not with multiple lines simultaneously.
To report one production order line as financially completed, use the following call:
PUT{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_financieel_gereed
{{restUrl}}/Documents/prdr/{{admi_num}}+{{prdh_num}}+{{prdr_num}}/Service/s_actie_financieel_gereed
Request body:
{
"request": {
"InputData": {
"prdr": [
{
"RowKey": "1",
"t_verwerk_aantal": 1,
"t_verwerk_afgewerkt": true,
"t_verwerk_datum": "{{TodayReverse}}",
"t_part_id": "{{$randomUUID}}",
"t_part_memo": "memo",
"prdr_parent": {{prdrnum_EP}}
}
]
}
}
}
- Published:7 mrt 2026 00:03
- TypeAlgemeen
- Category
- Product
- AvailabilityOpenbaar