🧾 API Documentation - X12 v.004010

Supports EDI operations for Purchase Order (PO), Purchase Order Response (POR), Invoice, and Advance Shipment Notice (ASN).

  1. X12 - PO

🧾 X12 - PO

Supports EDI operations for Purchase Order (PO)

Submit JSON input to receive a Base64-encoded X12 file. then convert base64 to text /edi from your application

Generate X12 PO [850]

🔗 Endpoint

POST /api/X12/PO

📥 Request

This endpoint accepts a purchase order with detailed line items and returns a Base64-encoded X12 EDI file as output.

📌 Input Fields (Header):

📌 Input Fields (Line Items):

🧪 Sample Request:

{
      "poNumber": "OP25002236",
      "poDate": "2025-05-19",
      "currencyCode": "SGD",
      "buyerName": "SLS BEARINGS (S) PTE LTD",
      "buyerCode": "SLS",
      "vendorName": "SLC (Singapore Logistics Centre)",
      "vendorCode": "TKRSLC",
      "shipCode": "10",
      "headerText": "We are pleased to confirm above items",
      "endChar": "~",
      "newLine": "no",
      "lineItems": [
        {
          "lineNum": "1.0",
          "item": "H206",
          "slsItem": "H-206-TIM",
          "qty": 4,
          "unitPrice": 3.8748,
          "deliveryDate": "2025-05-19"
        }
      ]
    }

📤 Successful Response

Returns a downloadable file encoded in Base64 with relevant metadata.

{
      "success": true,
      "data": [
        {
          "fileName": "OP25002236_TKRSLC_20250519_144241.edi",
          "fileType": "text/plain",
          "fileBase64": "base64 content here",
          "message": ""
        }
      ],
      "errors": null,
      "warnings": null
    }

❌ Failed Request Example

Request:

{
      "poNumber": "OP25002236",
      "carrierNumber": "122",
      "poDate": "2025-05-19",
      "currencyCode": "SGD",
      "buyerName": "SLS BEARINGS (S) PTE LTD",
      "buyerCode": "",
      "vendorName": "SLC (Singapore Logistics Centre)",
      "vendorCode": "TKRSLC",
      "shipCode": "10",
      "headerText": "We are pleased to confirm above items",
      "endChar": "~",
      "newLine": "no",
      "lineItems": [
        {
          "lineNum": "1.0",
          "item": "H206",
          "slsItem": "H-206-TIM",
          "qty": 4,
          "unitPrice": 3.8748,
          "deliveryDate": "2025-05-19"
        }
      ]
    }

Response:

{
      "success": false,
      "data": null,
      "errors": [
        {
          "code": "E02",
          "error_message": "Missing info at header level"
        }
      ],
      "warnings": null
    }
⬅️ Back to Home