42Q-MES0170-A 42Q Xchange ERP APIs
42Q Home > Tools > 42Q Xchange ERP APIs >42Q Xchange ERP APIs
Version MES15.70
Revision A3
Contents
Introduction
The 42Q Xchange ERP APIs is a middleware pub/sub solution that has been developed for customers to seamlessly integrate their Excel VBA Client, Customer Built Client, or Custom Built 42Q Adapters systems with 42Q and ERP. Communication between 42Q and ERP systems is through work order management.
42Q Xchange ERP APIs integration eliminates the need for duplication of effort in a customer's ERP system and 42Q, improving efficiency, accuracy, and linking these systems together.
42Q Xchange ERP APIs offers:
- Work Order Creation: Sending work orders from ERP to 42Q. Work order creation sends work order header, routing, components, and custom attributes from ERP to 42Q. This also includes sending ATO type of work orders from ERP to 42Q. Work Orders are created based on unique requirements
- Work Order Update: Sending work order changes from ERP to 42Q. Changes can be on: Dates, Status, Quantities Increases, Route (Department/Operations), Components (Add/Remove/Supply type).
- WIP Moves/Material Issues: Sending Incremental Unit movements, Rework, Scrap, and Completion movement from 42Q to ERP. WIP Moves updates ERP with the latest progress of the product. Material Issue sends the material/component consumption transaction from 42Q to ERP, it includes the material consumed, serial/lot number, and quantity consumed.
- Ship Notification: Sending shipment information and serial information to 42Q after sales order shipment on ERP.
The below diagram explains how the 42Q Xchange ERP APIs works:
Figure 1: 42Q Xchange ERP APIs Diagram
Customers are able to create their own Clients and Adapters; In Figure 2, users can see a diagram of the recommended Customer Built Client Architecture.
Figure 2: Customer Built Client Adapter Diagram
Supported Transactions
Figure 3: Supported Transactions Diagram
42Q Xchange API Details
API Details:
Protocol: HTTPS
Encryption: Recommended TLS 1.3. Does support TLS 1.0 or greater.
Security: Basic Authorization
Content Type: application/JSON
HTTP Method: POST
API Base URL:
Prod: https://erpwaf.42-q.com
UAT: https://erpuatwaf.42-q.com
API Paths:
/erp/wo/create : Post a new Work Order to 42Q.
/erp/wo/update : Update an existing Work Order in 42Q.
/erp/wo/status : Retrieve the 42Q processing status of a Work Order /create or /update
message sent.
/erp/wo/liveupdate: Live update of Work Order in 42Q.
/erp/order/shipment : Post Sales Order Shipment and Serial Information to 42Q.
/erp/wo/wip : Retrieve Work Order Operation Completions, Material Issues, and Unit
Completions from 42Q that are not marked as previously pulled.
/erp/wo/wip/period : Retrieve Work Order Operation Completions, Material Issues, and Unit
Completions from 42Q for a period of duration.
A 42Q Xchange API Schema Definition is provided, this document details the data to be provided in the request payloads and expected responses.
A 42Q Xchange API Swagger Definition is provided, this can be viewed in a swagger tool, such as https://editor.swagger.io, to get a more graphical/detailed description of the API.
Overview of 42Q Xchange Using Excel/LibreOffice
Create a 42Q Production Order from Excel/LibreOffice
In order to create a 42Q Production Order using a type of client, for example, Excel VBA, users must follow the next steps:
Note: The Excel/LibreOffice file will be provided by the 42Q team.
- Open the Excel file that contains the 42Q Production Order Creation Form.
- Enter all the required (*) information described in the form. Currently, form supports:
- Shop Order Header details (job number, part number, part description, quantity, etc).
Figure 4: Shop Order Header Details Table
- Custom attributes at Work Order Level and Work Order Part Level.
Figure 5: Custom Attributes Table
- Component Details.
Figure 6: Component Details Table
- Routing Details.
Figure 7: Routing Details Table
Note: The Libre Calc. file only supports Header information for WO Create.
- Click the Send To 42Q button.
Note: The value for the field MESSAGE: ID can be whatever value the users want, and it is not necessary to be a unique value.
Figure 8: 42Q Production Order Creation Form
- A new pop-up window will display, users must enter their password to submit the order.
- Click the OK button.
- A pop-up window will display to confirm to users that the work order creation request has been accepted, click the OK button to close it. The API call status will also show Success’ status.
Figure 9: Enter User’s Password
Figure 10: Response Window
Figure 11: API Response Message Recorded
Note: Users can only create one production work order at a time, and it's not possible to create a production work order with the same job number.
Check Production Order Acknowledgement
When a work order is sent to 42Q, 42Q will send an acknowledgment transaction back. Users can check the acknowledgment message on Excel and LibreOffice macro files using the following steps:
- Open the Excel file with Get 42Q Production Order Create Ack.
- Provide the Job number with the correct message Id, org code, and customer code, then, select Get WO Ack status.
- A pop-up response message will display, containing the status and message of the work order acknowledgment.
- WO Creation status, API call status, and Ref message will be updated.
Figure 12: Get 42Q Production Order Create Ack
Figure 13: Response
42Q Xchange ERP API Samples
https://erpuatwaf.42-q.com/erp/wo/create
Request:
{
"MESSAGE_ID": "123e4567-e89b-12d3-a456-426614174000",
"ORGANIZATION_CODE": "ORG1",
"CUSTOMER_CODE": "GENERIC",
"JOB_NUMBER": "JL9f",
"PART_DESCRIPTION": "42Q-MUG FINISHED GOOD",
"ASSEMBLY_ITEM_NUMBER": "42Q-MUG",
"QUANTITY": 6,
"JOB_STATUS": "RELEASED"
}
Response:
{
"STATUS": "Success",
"MESSAGE": "WO Create Request Accepted.",
"WO": [],
"WIP": [],
"REF": {
"CUST": "123e4567-e89b-12d3-a456-426614174000",
"42Q": 58,
"API": "bd7ae623-3850-4985-ab1b-11e20cdecbc9",
"ERR_CDE": 0,
"ERR_MSG": "",
"DATETIME": "2021-03-09T16:48:02.720Z"
}
}
https://erpuatwaf.42-q.com/erp/wo/status
Request:
{
"MESSAGE_ID": "123e4567-e89b-12d3-a456-426614174000",
"ORGANIZATION_CODE": "ORG1",
"CUSTOMER_CODE": "GENERIC",
"JOB_NUMBER": "JL9f"
}
Response:
{
"STATUS": "Success",
"MESSAGE": "7 - Received by 42Q",
"WO": [],
"WIP": [],
"REF": {
"CUST": "123e4567-e89b-12d3-a456-426614174000",
"42Q": -1,
"API": "8bbe3828-273c-484e-a157-059afbc11199",
"ERR_CDE": 0,
"ERR_MSG": "",
"DATETIME": "2021-03-09T16:48:29.186Z"
}
}
https://erpuatwaf.42-q.com/erp/wo/update
Request:
{
"MESSAGE_ID": "123e4567-e89b-12d3-a456-426614174000",
"ORGANIZATION_CODE": "ORG1",
"CUSTOMER_CODE": "GENERIC",
"JOB_NUMBER": "JL9f",
"PART_DESCRIPTION": "42Q-MUG FINISHED GOOD",
"ASSEMBLY_ITEM_NUMBER": "42Q-MUG",
"QUANTITY": 6,
"JOB_STATUS": "RELEASED"
}
Response:
{
"STATUS": "Success",
"MESSAGE": "WO Update Request Accepted.",
"WO": [],
"WIP": [],
"REF": {
"CUST": "123e4567-e89b-12d3-a456-426614174000",
"42Q": 58,
"API": "bd7ae623-3850-4985-ab1b-11e20cdecbc9",
"ERR_CDE": 0,
"ERR_MSG": "",
"DATETIME": "2021-03-09T16:48:02.720Z"
}
}
https://erpuatwaf.42-q.com/erp/wo/liveupdate
Request:
{
"MESSAGE_ID": "43D03251548A5238E05366FAA4943E45",
"ORGANIZATION_CODE": "ORG1",
"CUSTOMER_CODE": "GENERIC",
"JOB_NUMBER": "JL9f",
"QUANTITY": 5,
"JOB_STATUS": "7"
}
Response:
{
"STATUS": "Error",
"MESSAGE": "false Job not released in MDS",
"WO": [],
"WIP": [],
"REF": {
"CUST": "43D03251548A5238E05366FAA4943E45",
"42Q": 60,
"API": "900b72f8-b923-4a9d-98c0-599a95932f35",
"ERR_CDE": 1,
"ERR_MSG": "Job cannot be changed",
"DATETIME": "2021-03-09T16:52:37.489Z"
}
}
https://erpuatwaf.42-q.com/erp/order/shipment
Request:
{
"MESSAGE_ID": "43D03251548A5238E05366FAA4943E45",
"ORGANIZATION_CODE": "ORG1",
"CUSTOMER_CODE": "GENERIC",
"SALES_ORDER": "SO0001",
"CUST_PO_NUMBER": "PO0001",
"SHIP_IDENTIFIER": "AIR0001-42Q",
"SHIP_METHOD": "AIR",
"SHIP_TO_LOCATION": "42Q",
"SHIP_TO_ADDRESS1": "Plumeria Drive",
"SHIP_TO_ADDRESS2": "Building 2",
"SHIP_TO_CITY": "SAN JOSE",
"SHIP_TO_STATE": "CA",
"SHIP_TO_COUNTRY": "US",
"SERIALS": [
{
"SERIAL": "SABC00001",
"LINE_NUMBER": "x1"
},
{
"SERIAL": "SABC00002",
"LINE_NUMBER": "x2"
}
]
}
Response:
{
"STATUS": "Success",
"MESSAGE": "Ship Notify Sent Successfully.",
"WO": [],
"WIP": [],
"REF": {
"CUST": "43D03251548A5238E05366FAA4943E45",
"42Q": 59,
"API": "1a9a582a-e057-4c45-8b12-a55fd42ed3a9",
"ERR_CDE": 0,
"ERR_MSG": "",
"DATETIME": "2021-03-09T16:49:13.085Z"
}
}
https://erpuatwaf.42-q.com/erp/wo/wip
Request:
{
"MESSAGE_ID": "43D03251548A5238E05366FAA4943E45",
"ORGANIZATION_CODE": "ORG1",
"CUSTOMER_CODE": "GENERIC"
}
https://erpuatwaf.42-q.com/erp/wo/wip/period
Request:
{
"MESSAGE_ID": "43D03251548A5238E05366FAA4943E45",
"ORGANIZATION_CODE": "ORG1",
"CUSTOMER_CODE": "GENERIC",
"START_DATETIME": "2021-04-22",
"END_DATETIME": "2021-04-23T10:23:22.22Z"
}
Response:
{
"STATUS": "Success",
"MESSAGE": "",
"WO": [],
"WIP": [
{
"JOB_NUMBER": "JL1",
"TRANSACTION_ID": 13145,
"MESSAGE_ID": "c4246601-00c8-4134-a90e-057973e39452",
"DATE_TIME": "2020-10-30T15:20:02.886",
"MOVES": [
{
"QUANTITY": 1,
"FROM_SEQUENCE": 30,
"FROM_STEP": "In Queue",
"TO_SEQUENCE": 40,
"TO_STEP": "In Queue",
"SEQUENCE": 3,
"HANDS_ON_TIME": 4,
"PICKED": false
},
{
"QUANTITY": 2,
"FROM_SEQUENCE": 40,
"FROM_STEP": "In Queue",
"TO_SEQUENCE": 50,
"TO_STEP": "In Queue",
"SEQUENCE": 5,
"HANDS_ON_TIME": 6,
"PICKED": false
}
],
"COMPLETIONS": [
{
"SERIAL_NUMBER": "2090308-001",
"MANUFACTURE_DATE": "2020-10-30T10:17:02.000-04:00",
"PICKED": false
},
{
"SERIAL_NUMBER": "2090308-002",
"MANUFACTURE_DATE": "2020-09-30T11:17:02.000-04:00",
"PICKED": false
}
],
"MTRL_MOVE": [
{
"COMPONENT_ITEM": "42Q-SHEET1",
"OP_SEQUENCE": 0,
"SUB_INVENTORY": "test",
"SUB_LOCATOR": "test",
"QUANTITY": 1,
"TYPE": "ISSUE",
"PICKED": false,
"DETAILS": [
{
"LOT_NUMBER": null,
"LOT_QUANTITY": null,
"SERIAL_NUMBER": "INST900078",
"PARENT_SERIAL": "MUG000138"
},
{
"LOT_NUMBER": null,
"LOT_QUANTITY": null,
"SERIAL_NUMBER": "INST900078",
"PARENT_SERIAL": "MUG000138"
}
]
},
{
"COMPONENT_ITEM": "42Q-INST",
"OP_SEQUENCE": 10,
"SUB_INVENTORY": "test",
"SUB_LOCATOR": "test",
"QUANTITY": 1,
"TYPE": "ISSUE",
"PICKED": false,
"DETAILS": [
{
"LOT_NUMBER": "1000",
"LOT_QUANTITY": 1,
"SERIAL_NUMBER": null,
"PARENT_SERIAL": null
}
]
}
]
}
],
"REF": {
"CUST": "43D03251548A5238E05366FAA4943E45",
"42Q": -1,
"API": "f92a8889-3deb-42e5-b5c6-1e715163d80d",
"ERR_CDE": 0,
"ERR_MSG": "",
"DATETIME": "2021-03-24T07:11:59.614-07:00"
}
}