EANCOM PRICAT Price/Sales Catalogue Last updated: 2026-09-29

PRICAT is the price/sales catalogue message. Suppliers use it to send product master data and prices to their customers. This sample follows EANCOM D96A, which identifies items by GTIN and parties by GLN.

The header names the parties and currency, and each LIN group is an item with PIA identifiers, IMD descriptions, measurements, packaging and PRI prices.

At a glance

Standard
EANCOM
Version
D96A EAN009
Sent by
Supplier to retailer or distributor
Responses
CONTRL, APERAK
ediFabric .NET template
TSPRICAT in EdiFabric.Templates.Edifact
OpenEDI definition
View PRICAT in the spec library

PRICAT structure

The full EANCOM PRICAT layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 43 loops and 107 segment positions, in file order. Loops are shaded and their segments indented; Max use is how many times a segment or loop may repeat.

Segment / loop Name Usage Max use
UNHMessage headerMandatory1
BGMBeginning of messageMandatory1
DTMDate/time/periodMandatory35
FTXFree textOptional99
RFF loopReferenceOptional99
RFFReferenceMandatory1
DTMDate/time/periodOptional5
NAD loopName and addressOptional99
NADName and addressMandatory1
RFF loopReferenceOptional10
RFFReferenceMandatory1
CTA loopContact informationOptional5
CTAContact informationMandatory1
COMCommunication contactOptional5
TAX loopDuty/tax/fee detailsOptional5
TAXDuty/tax/fee detailsMandatory1
CUX loopCurrenciesOptional5
CUXCurrenciesMandatory1
DTMDate/time/periodOptional5
PAT loopPayment terms basisOptional10
PATPayment terms basisMandatory1
PCDPercentage detailsOptional1
TDT loopDetails of transportOptional10
TDTDetails of transportMandatory1
TOD loopTerms of delivery or transportOptional5
TODTerms of delivery or transportMandatory1
LOCPlace/location identificationOptional2
ALC loopAllowance or chargeOptional10
ALCAllowance or chargeMandatory1
ALIAdditional informationOptional5
DTMDate/time/periodOptional9
QTY loopQuantityOptional1
QTYQuantityMandatory1
RNGRange detailsOptional1
PCD loopPercentage detailsOptional1
PCDPercentage detailsMandatory1
RNGRange detailsOptional1
MOA loopMonetary amountOptional2
MOAMonetary amountMandatory1
RNGRange detailsOptional1
RTE loopRate detailsOptional1
RTERate detailsMandatory1
RNGRange detailsOptional1
TAX loopDuty/tax/fee detailsOptional5
TAXDuty/tax/fee detailsMandatory1
MOAMonetary amountOptional1
PGI loopProduct group informationOptional1000
PGIProduct group informationMandatory1
DTMDate/time/periodOptional15
QTYQuantityOptional10
ALIAdditional informationOptional5
FTXFree textOptional5
CUX loopCurrenciesOptional10
CUXCurrenciesMandatory1
DTMDate/time/periodOptional5
PRI loopPrice detailsOptional100
PRIPrice detailsMandatory1
RNGRange detailsOptional1
DTMDate/time/periodOptional5
TAX loopDuty/tax/fee detailsOptional10
TAXDuty/tax/fee detailsMandatory1
MOAMonetary amountOptional1
ALC loopAllowance or chargeOptional99
ALCAllowance or chargeMandatory1
ALIAdditional informationOptional5
QTY loopQuantityOptional1
QTYQuantityMandatory1
RNGRange detailsOptional1
PCD loopPercentage detailsOptional1
PCDPercentage detailsMandatory1
RNGRange detailsOptional1
MOA loopMonetary amountOptional2
MOAMonetary amountMandatory1
RNGRange detailsOptional1
RTE loopRate detailsOptional1
RTERate detailsMandatory1
RNGRange detailsOptional1
TAX loopDuty/tax/fee detailsOptional5
TAXDuty/tax/fee detailsMandatory1
MOAMonetary amountOptional1
NAD loopName and addressOptional20
NADName and addressMandatory1
LOCPlace/location identificationOptional5
RFF loopReferenceOptional10
RFFReferenceMandatory1
DTMDate/time/periodOptional5
CTA loopContact informationOptional5
CTAContact informationMandatory1
COMCommunication contactOptional5
PAT loopPayment terms basisOptional10
PATPayment terms basisMandatory1
PCDPercentage detailsOptional1
TDT loopDetails of transportOptional10
TDTDetails of transportMandatory1
TOD loopTerms of delivery or transportOptional5
TODTerms of delivery or transportMandatory1
LOCPlace/location identificationOptional2
PAC loopPackageOptional10
PACPackageMandatory1
MEAMeasurementsOptional10
LIN loopLine itemOptional999999
LINLine itemMandatory1
PIAAdditional product idOptional10
IMDItem descriptionOptional999
MEAMeasurementsOptional10
QTYQuantityOptional10
HANHandling instructionsOptional5
ALIAdditional informationOptional5
DTMDate/time/periodOptional10
RFFReferenceOptional1
LOCPlace/location identificationOptional1
FTXFree textOptional5
TAX loopDuty/tax/fee detailsOptional10
TAXDuty/tax/fee detailsMandatory1
MOAMonetary amountOptional1
PRI loopPrice detailsOptional100
PRIPrice detailsMandatory1
CUXCurrenciesOptional1
APRAdditional price informationOptional1
RNGRange detailsOptional1
DTMDate/time/periodOptional5
ALC loopAllowance or chargeOptional99
ALCAllowance or chargeMandatory1
ALIAdditional informationOptional5
DTMDate/time/periodOptional9
QTY loopQuantityOptional1
QTYQuantityMandatory1
RNGRange detailsOptional1
PCD loopPercentage detailsOptional1
PCDPercentage detailsMandatory1
RNGRange detailsOptional1
MOA loopMonetary amountOptional2
MOAMonetary amountMandatory1
RNGRange detailsOptional1
RTE loopRate detailsOptional1
RTERate detailsMandatory1
RNGRange detailsOptional1
TAX loopDuty/tax/fee detailsOptional5
TAXDuty/tax/fee detailsMandatory1
MOAMonetary amountOptional1
PAC loopPackageOptional10
PACPackageMandatory1
MEAMeasurementsOptional10
HANHandling instructionsOptional5
PAT loopPayment terms basisOptional10
PATPayment terms basisMandatory1
DTMDate/time/periodOptional5
PCDPercentage detailsOptional1
MOAMonetary amountOptional1
UNTMessage trailerMandatory1

Sample PRICAT file

An EANCOM price catalogue with item identifiers, descriptions and prices. Paste it into EdiNation to see every element named and validated.

UNB+UNOA:2+SID+RID+20130430:1159+I-EX1/1+++++T01'
UNH+ME000001+PRICAT:D:96A:UN:EAN009'
BGM+9+PC32458+9'
DTM+137:20021001:102'
RFF+CT:5622ABE'
DTM+171:20020810:102'
NAD+BY+5412345000020::9'
RFF+VA:VR12345'
NAD+SU+4012345500004::9'
RFF+VA:VR95745'
CUX+2:EUR:8'
PGI+2'
LIN+1+1+5410738377131:SRV'
PIA+1+CU32555:SA'
IMD+C++CU::9'
IMD+F++:::HEALTHIEST CORN CRISPIES:BOX'
MEA+PD+AAA:4+GRM:250'
HAN+EAT::9'
TAX+7+VAT+++:::21+S'
PRI+AAE:40:CA:SRP'
PAC+++BX'
MEA+PD+HT+MMT:200'
MEA+PD+LN+MMT:80'
MEA+PD+WD+MMT:30'
LIN+2+1+5410738377117:SRV'
PIA+1+TU32555:SA'
IMD+C++TU::9'
IMD+F++:::CORN CRISPIES:CASE'
HAN+EAT::9'
ALI+BE'
TAX+7+VAT+++:::21+S'
PRI+AAB:500:CA'
ALC+A+++1'
PCD+3:8'
RNG+1+PCE:48'
PAC+++CT'
LIN+3+1+5410738377131:SRV+1:2'
QTY+45E:48'
LIN+4+1+5410738251028:SRV'
PIA+1+PN32555:SA'
IMD+C++DU:9'
IMD+F++:::CORN CRISPIES:PALLET'
HAN+EAT::9'
HAN+FTD::9'
TAX+7+VAT+++:::21+S'
PRI+AAA:24000:CA'
ALC+A+++1'
PCD+1:10'
RNG+1+PCE:50'
PAC+++201::9'
LIN+5+1+5410738377117:SRV+1:4'
QTY+45E:24'
UNT+52+ME000001'
UNZ+1+I-EX1/1'

The same PRICAT as JSON

ediFabric turns every loop, segment and element into a named field. This is the transaction from the sample, in the JSON that ediFabric Native and Cloud return and accept.

{
  "UNH": {
    "MessageReferenceNumber_01": "ME000001",
    "MessageIdentifier_02": {
      "MessageType_01": "PRICAT",
      "MessageVersionNumber_02": "D",
      "MessageReleaseNumber_03": "96A",
      "ControllingAgencyCoded_04": "UN",
      "AssociationAssignedCode_05": "EAN009"
    }
  },
  "BGM": {
    "DOCUMENTMESSAGENAME_01": {
      "Documentmessagenamecoded_01": "9"
    },
    "DOCUMENTMESSAGENUMBER_02": "PC32458",
    "MESSAGEFUNCTIONCODED_03": "9"
  },
  "DTM": [
    {
      "DATETIMEPERIOD_01": {
        "Datetimeperiodqualifier_01": "137",
        "Datetimeperiod_02": "20021001",
        "Datetimeperiodformatqualifier_03": "102"
      }
    }
  ],
  "RFFLoop": [
    {
      "RFF": {
        "REFERENCE_01": {
          "Referencequalifier_01": "CT",
          "Referencenumber_02": "5622ABE"
        }
      },
      "DTM": [
        {
          "DATETIMEPERIOD_01": {
            "Datetimeperiodqualifier_01": "171",
            "Datetimeperiod_02": "20020810",
            "Datetimeperiodformatqualifier_03": "102"
          }
        }
      ]
    }
  ],
  "NADLoop": [
    {
      "NAD": {
        "PARTYQUALIFIER_01": "BY",
        "PARTYIDENTIFICATIONDETAILS_02": {
          "Partyididentification_01": "5412345000020",
          "Codelistresponsibleagencycoded_03": "9"
        }
      },
      "RFFLoop": [
        {
          "RFF": {
            "REFERENCE_01": {
              "Referencequalifier_01": "VA",
              "Referencenumber_02": "VR12345"
            }
          }
        }
      ]
    },
    {
      "NAD": {
        "PARTYQUALIFIER_01": "SU",
        "PARTYIDENTIFICATIONDETAILS_02": {
          "Partyididentification_01": "4012345500004",
          "Codelistresponsibleagencycoded_03": "9"
        }
      },
      "RFFLoop": [
        {
          "RFF": {
            "REFERENCE_01": {
              "Referencequalifier_01": "VA",
              "Referencenumber_02": "VR95745"
            }
          }
        }
      ]
    }
  ],
  "CUXLoop": [
    {
      "CUX": {
        "CURRENCYDETAILS_01": {
          "Currencydetailsqualifier_01": "2",
          "Currencycoded_02": "EUR",
          "Currencyqualifier_03": "8"
        }
      }
    }
  ],
  "PGILoop": [
    {
      "PGI": {
        "PRODUCTGROUPTYPECODED_01": "2"
      },
      "LINLoop": [
        {
          "LIN": {
            "LINEITEMNUMBER_01": "1",
            "ACTIONREQUESTNOTIFICATIONCODED_02": "1",
            "ITEMNUMBERIDENTIFICATION_03": {
              "Itemnumber_01": "5410738377131",
              "Itemnumbertypecoded_02": "SRV"
            }
          },
          "PIA": [
            {
              "PRODUCTIDFUNCTIONQUALIFIER_01": "1",
              "ITEMNUMBERIDENTIFICATION_02": {
                "Itemnumber_01": "CU32555",
                "Itemnumbertypecoded_02": "SA"
              }
            }
          ],
          "IMD": [
            {
              "ITEMDESCRIPTIONTYPECODED_01": "C",
              "ITEMDESCRIPTION_03": {
                "Itemdescriptionidentification_01": "CU",
                "Codelistresponsibleagencycoded_03": "9"
              }
            },
            {
              "ITEMDESCRIPTIONTYPECODED_01": "F",
              "ITEMDESCRIPTION_03": {
                "Itemdescription_04": "HEALTHIEST CORN CRISPIES",
                "Itemdescription_05": "BOX"
              }
            }
          ],
          "MEA": [
            {
              "MEASUREMENTAPPLICATIONQUALIFIER_01": "PD",
              "MEASUREMENTDETAILS_02": {
                "Measurementdimensioncoded_01": "AAA",
                "Measurementsignificancecoded_02": "4"
              },
              "VALUERANGE_03": {
                "Measureunitqualifier_01": "GRM",
                "Measurementvalue_02": "250"
              }
            }
          ],
          "HAN": [
            {
              "HANDLINGINSTRUCTIONS_01": {
                "Handlinginstructionscoded_01": "EAT",
                "Codelistresponsibleagencycoded_03": "9"
              }
            }
          ],
          "TAXLoop": [
            {
              "TAX": {
                "DUTYTAXFEEFUNCTIONQUALIFIER_01": "7",
                "DUTYTAXFEETYPE_02": {
                  "Dutytaxfeetypecoded_01": "VAT"
                },
                "DUTYTAXFEEDETAIL_05": {
                  "Dutytaxfeerate_04": "21"
                },
                "DUTYTAXFEECATEGORYCODED_06": "S"
              }
            }
          ],
          "PRILoop": [
            {
              "PRI": {
                "PRICEINFORMATION_01": {
                  "Pricequalifier_01": "AAE",
                  "Price_02": "40",
                  "Pricetypecoded_03": "CA",
                  "Pricetypequalifier_04": "SRP"
                }
              }
            }
          ],
          "PACLoop": [
            {
              "PAC": {
                "PACKAGETYPE_03": {
                  "Typeofpackagesidentification_01": "BX"
                }
              },
              "MEA": [
                {
                  "MEASUREMENTAPPLICATIONQUALIFIER_01": "PD",
                  "MEASUREMENTDETAILS_02": {
                    "Measurementdimensioncoded_01": "HT"
                  },
                  "VALUERANGE_03": {
                    "Measureunitqualifier_01": "MMT",
                    "Measurementvalue_02": "200"
                  }
                },
                {
                  "MEASUREMENTAPPLICATIONQUALIFIER_01": "PD",
                  "MEASUREMENTDETAILS_02": {
                    "Measurementdimensioncoded_01": "LN"
                  },
                  "VALUERANGE_03": {
                    "Measureunitqualifier_01": "MMT",
                    "Measurementvalue_02": "80"
                  }
                },
                {
                  "MEASUREMENTAPPLICATIONQUALIFIER_01": "PD",
                  "MEASUREMENTDETAILS_02": {
                    "Measurementdimensioncoded_01": "WD"
                  },
                  "VALUERANGE_03": {
                    "Measureunitqualifier_01": "MMT",
                    "Measurementvalue_02": "30"
                  }
                }
              ]
            }
          ]
        },
        {
          "LIN": {
            "LINEITEMNUMBER_01": "2",
            "ACTIONREQUESTNOTIFICATIONCODED_02": "1",
            "ITEMNUMBERIDENTIFICATION_03": {
              "Itemnumber_01": "5410738377117",
              "Itemnumbertypecoded_02": "SRV"
            }
          },
          "PIA": [
            {
              "PRODUCTIDFUNCTIONQUALIFIER_01": "1",
              "ITEMNUMBERIDENTIFICATION_02": {
                "Itemnumber_01": "TU32555",
                "Itemnumbertypecoded_02": "SA"
              }
            }
          ],
          "IMD": [
            {
              "ITEMDESCRIPTIONTYPECODED_01": "C",
              "ITEMDESCRIPTION_03": {
                "Itemdescriptionidentification_01": "TU",
                "Codelistresponsibleagencycoded_03": "9"
              }
            },
            {
              "ITEMDESCRIPTIONTYPECODED_01": "F",
              "ITEMDESCRIPTION_03": {
                "Itemdescription_04": "CORN CRISPIES",
                "Itemdescription_05": "CASE"
              }
            }
          ],
          "HAN": [
            {
              "HANDLINGINSTRUCTIONS_01": {
                "Handlinginstructionscoded_01": "EAT",
                "Codelistresponsibleagencycoded_03": "9"
              }
            }
          ],
          "ALI": [
            {
              "COUNTRYOFORIGINCODED_01": "BE"
            }
          ],
          "TAXLoop": [
            {
              "TAX": {
                "DUTYTAXFEEFUNCTIONQUALIFIER_01": "7",
                "DUTYTAXFEETYPE_02": {
                  "Dutytaxfeetypecoded_01": "VAT"
                },
                "DUTYTAXFEEDETAIL_05": {
                  "Dutytaxfeerate_04": "21"
                },
                "DUTYTAXFEECATEGORYCODED_06": "S"
              }
            }
          ],
          "PRILoop": [
            {
              "PRI": {
                "PRICEINFORMATION_01": {
                  "Pricequalifier_01": "AAB",
                  "Price_02": "500",
                  "Pricetypecoded_03": "CA"
                }
              }
            }
          ],
          "ALCLoop": [
            {
              "ALC": {
                "ALLOWANCEORCHARGEQUALIFIER_01": "A",
                "CALCULATIONSEQUENCEINDICATORCODED_04": "1"
              },
              "PCDLoop": {
                "PCD": {
                  "PERCENTAGEDETAILS_01": {
                    "Percentagequalifier_01": "3",
                    "Percentage_02": "8"
                  }
                },
                "RNG": {
                  "RANGETYPEQUALIFIER_01": "1",
                  "RANGE_02": {
                    "Measureunitqualifier_01": "PCE",
                    "Rangeminimum_02": "48"
                  }
                }
              }
            }
          ],
          "PACLoop": [
            {
              "PAC": {
                "PACKAGETYPE_03": {
                  "Typeofpackagesidentification_01": "CT"
                }
              }
            }
          ]
        },
        {
          "LIN": {
            "LINEITEMNUMBER_01": "3",
            "ACTIONREQUESTNOTIFICATIONCODED_02": "1",
            "ITEMNUMBERIDENTIFICATION_03": {
              "Itemnumber_01": "5410738377131",
              "Itemnumbertypecoded_02": "SRV"
            },
            "SUBLINEINFORMATION_04": {
              "Sublineindicatorcoded_01": "1",
              "Lineitemnumber_02": "2"
            }
          },
          "QTY": [
            {
              "QUANTITYDETAILS_01": {
                "Quantityqualifier_01": "45E",
                "Quantity_02": "48"
              }
            }
          ]
        },
        {
          "LIN": {
            "LINEITEMNUMBER_01": "4",
            "ACTIONREQUESTNOTIFICATIONCODED_02": "1",
            "ITEMNUMBERIDENTIFICATION_03": {
              "Itemnumber_01": "5410738251028",
              "Itemnumbertypecoded_02": "SRV"
            }
          },
          "PIA": [
            {
              "PRODUCTIDFUNCTIONQUALIFIER_01": "1",
              "ITEMNUMBERIDENTIFICATION_02": {
                "Itemnumber_01": "PN32555",
                "Itemnumbertypecoded_02": "SA"
              }
            }
          ],
          "IMD": [
            {
              "ITEMDESCRIPTIONTYPECODED_01": "C",
              "ITEMDESCRIPTION_03": {
                "Itemdescriptionidentification_01": "DU",
                "Codelistqualifier_02": "9"
              }
            },
            {
              "ITEMDESCRIPTIONTYPECODED_01": "F",
              "ITEMDESCRIPTION_03": {
                "Itemdescription_04": "CORN CRISPIES",
                "Itemdescription_05": "PALLET"
              }
            }
          ],
          "HAN": [
            {
              "HANDLINGINSTRUCTIONS_01": {
                "Handlinginstructionscoded_01": "EAT",
                "Codelistresponsibleagencycoded_03": "9"
              }
            },
            {
              "HANDLINGINSTRUCTIONS_01": {
                "Handlinginstructionscoded_01": "FTD",
                "Codelistresponsibleagencycoded_03": "9"
              }
            }
          ],
          "TAXLoop": [
            {
              "TAX": {
                "DUTYTAXFEEFUNCTIONQUALIFIER_01": "7",
                "DUTYTAXFEETYPE_02": {
                  "Dutytaxfeetypecoded_01": "VAT"
                },
                "DUTYTAXFEEDETAIL_05": {
                  "Dutytaxfeerate_04": "21"
                },
                "DUTYTAXFEECATEGORYCODED_06": "S"
              }
            }
          ],
          "PRILoop": [
            {
              "PRI": {
                "PRICEINFORMATION_01": {
                  "Pricequalifier_01": "AAA",
                  "Price_02": "24000",
                  "Pricetypecoded_03": "CA"
                }
              }
            }
          ],
          "ALCLoop": [
            {
              "ALC": {
                "ALLOWANCEORCHARGEQUALIFIER_01": "A",
                "CALCULATIONSEQUENCEINDICATORCODED_04": "1"
              },
              "PCDLoop": {
                "PCD": {
                  "PERCENTAGEDETAILS_01": {
                    "Percentagequalifier_01": "1",
                    "Percentage_02": "10"
                  }
                },
                "RNG": {
                  "RANGETYPEQUALIFIER_01": "1",
                  "RANGE_02": {
                    "Measureunitqualifier_01": "PCE",
                    "Rangeminimum_02": "50"
                  }
                }
              }
            }
          ],
          "PACLoop": [
            {
              "PAC": {
                "PACKAGETYPE_03": {
                  "Typeofpackagesidentification_01": "201",
                  "Codelistresponsibleagencycoded_03": "9"
                }
              }
            }
          ]
        },
        {
          "LIN": {
            "LINEITEMNUMBER_01": "5",
            "ACTIONREQUESTNOTIFICATIONCODED_02": "1",
            "ITEMNUMBERIDENTIFICATION_03": {
              "Itemnumber_01": "5410738377117",
              "Itemnumbertypecoded_02": "SRV"
            },
            "SUBLINEINFORMATION_04": {
              "Sublineindicatorcoded_01": "1",
              "Lineitemnumber_02": "4"
            }
          },
          "QTY": [
            {
              "QUANTITYDETAILS_01": {
                "Quantityqualifier_01": "45E",
                "Quantity_02": "24"
              }
            }
          ]
        }
      ]
    }
  ],
  "UNT": {
    "NumberofSegmentsinaMessage_01": "52",
    "MessageReferenceNumber_02": "ME000001"
  }
}

Parse and validate a PRICAT file

Read the file into typed objects with ediFabric .NET, or post it to the ediFabric Cloud REST API from any language and get JSON back.

using EdiFabric.Templates.EdifactD96A;

License.SetSerial("YOUR_SERIAL_KEY");

using (var stream = File.OpenRead(@"C:\edi\PriceCatalogue.txt"))
using (var reader = new EdifactReader(stream, "EdiFabric.Templates.Edifact"))
{
    var items = await reader.ReadToEndAsync();
    foreach (var transaction in items.OfType<TSPRICAT>())
    {
        if (transaction.IsValid(out MessageErrorContext errors))
            Console.WriteLine($"{transaction.UNH.MessageReferenceNumber_01} is valid");
        else
            Console.WriteLine(string.Join(Environment.NewLine, errors.Flatten()));
    }
}
curl -X POST 'https://api.edination.com/v2/edifact/read' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/octet-stream' \
--data-binary '@PriceCatalogue.txt'

Generate a PRICAT file

Populate a TSPRICAT object in .NET, or post JSON in the shape shown above to ediFabric Cloud, and get a valid PRICAT file back.

using EdiFabric.Templates.EdifactD96A;

License.SetSerial("YOUR_SERIAL_KEY");

var transaction = new TSPRICAT();

//  Message header
transaction.UNH = new UNH();
transaction.UNH.MessageReferenceNumber_01 = "0001";
transaction.UNH.MessageIdentifier_02 = new S009();
transaction.UNH.MessageIdentifier_02.MessageType_01 = "PRICAT";
transaction.UNH.MessageIdentifier_02.MessageVersionNumber_02 = "D";
transaction.UNH.MessageIdentifier_02.MessageReleaseNumber_03 = "96A";
transaction.UNH.MessageIdentifier_02.ControllingAgencyCoded_04 = "UN";

//  Price/sales catalogue number PC32458
transaction.BGM = new BGM();
transaction.BGM.DOCUMENTMESSAGENAME_01 = new C002();
transaction.BGM.DOCUMENTMESSAGENAME_01.Documentmessagenamecoded_01 = "9";
transaction.BGM.Documentmessagenumber_02 = "PC32458";
transaction.BGM.Messagefunctioncoded_03 = "9";

//  Repeating DTM
transaction.DTM = new List<DTM>();

// ... set the remaining loops and segments the same way

// SegmentBuilders is in the Common project of the example repository
using (var stream = new MemoryStream())
{
    using (var writer = new EdifactWriter(stream))
    {
        writer.Write(SegmentBuilders.BuildUnb("1"));
        writer.Write(transaction);
    }
    Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray()));
}
# the JSON returned by /read, edited or produced by your application
curl -X POST 'https://api.edination.com/v2/edifact/write' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/json' \
--data-binary '@PriceCatalogue.json' \
-o 'PriceCatalogue.txt'

Complete ediFabric .NET example

A complete C# program for the EANCOM PRICAT, built on TSPRICAT in EdiFabric.Templates.Edifact. The same code is in the ediFabric .NET examples on GitHub.

using EdiFabric.Core.Model.Edi;
using EdiFabric.Framework.Readers;
using EdiFabric.Framework.Writers;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using EdiFabric.Core.Model.Edi.Edifact;
using EdiFabric.Templates.EdifactD96A;
using EdiFabric.Examples.EDIFACT.Common;

namespace EdiFabric.Examples.EDIFACT.PRICAT
{
    class Program
    {
        static void Main(string[] args)
        {
            SerialKey.Set(Common.SerialKey.Get());
            Read();
            Write();
        }

        ///
        /// Read Price Catalogue
        ///
        static void Read()
        {
            var ediStream = File.OpenRead(Directory.GetCurrentDirectory() + @"\..\..\..\Files\Eancom\PriceCatalogue.txt");

            List ediItems;
            using (var ediReader = new EdifactReader(ediStream, "EdiFabric.Templates.Edifact"))
                ediItems = ediReader.ReadToEnd().ToList();

            var transactions = ediItems.OfType();

            foreach (var transaction in transactions)
            {
                if (transaction.HasErrors)
                {
                    //  partially parsed
                    var errors = transaction.ErrorContext.Flatten();
                }
            }
        }

        ///
        /// Write Price Catalogue
        ///
        static void Write()
        {
            var transaction = BuildPriceCatalogue("ME000001");

            using (var stream = new MemoryStream())
            {
                using (var writer = new EdifactWriter(stream))
                {
                    writer.Write(SegmentBuilders.BuildUnb("1"));
                    writer.Write(transaction);
                }

                var ediString = stream.LoadToString();
            }
        }

        ///
        /// Build price catalogue.
        /// Original from https://www.gs1.org/sites/default/files/docs/eancom/s4/pricat.pdf
        ///
        static TSPRICAT BuildPriceCatalogue(string controlNumber)
        {
            var result = new TSPRICAT();

            //  Message header
            result.UNH = new UNH();
            result.UNH.MessageReferenceNumber_01 = controlNumber.PadLeft(14, '0');
            result.UNH.MessageIdentifier_02 = new S009();
            result.UNH.MessageIdentifier_02.MessageType_01 = "PRICAT";
            result.UNH.MessageIdentifier_02.MessageVersionNumber_02 = "D";
            result.UNH.MessageIdentifier_02.MessageReleaseNumber_03 = "96A";
            result.UNH.MessageIdentifier_02.ControllingAgencyCoded_04 = "UN";

            //  Price/sales catalogue number PC32458
            result.BGM = new BGM();
            result.BGM.DOCUMENTMESSAGENAME_01 = new C002();
            result.BGM.DOCUMENTMESSAGENAME_01.Documentmessagenamecoded_01 = "9";
            result.BGM.Documentmessagenumber_02 = "PC32458";
            result.BGM.Messagefunctioncoded_03 = "9";

            //  Repeating DTM
            result.DTM = new List();

            //  Message date 1st October 2002
            var dtm1 = new DTM();
            dtm1.DATETIMEPERIOD_01 = new C507();
            dtm1.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "137";
            dtm1.DATETIMEPERIOD_01.Datetimeperiod_02 = "20021001";
            dtm1.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102";
            result.DTM.Add(dtm1);

            //  Repeating RFF Groups
            result.RFFLoop = new List();

            //  Begin RFF Group
            var rffLoop1 = new Loop_RFF_PRICAT();

            //  Price list is related to contract number 5622ABE
            rffLoop1.RFF = new RFF();
            rffLoop1.RFF.REFERENCE_01 = new C506();
            rffLoop1.RFF.REFERENCE_01.Referencequalifier_01 = "CT";
            rffLoop1.RFF.REFERENCE_01.Referencenumber_02 = "5622ABE";

            //  Repeating DTM
            rffLoop1.DTM = new List();

            //  Contract date 10th of August 2002
            var dtmRff1 = new DTM();
            dtmRff1.DATETIMEPERIOD_01 = new C507();
            dtmRff1.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "171";
            dtmRff1.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020810";
            dtmRff1.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102";
            rffLoop1.DTM.Add(dtmRff1);

            //  End RFF Group
            result.RFFLoop.Add(rffLoop1);

            //  Repeating NAD Groups
            result.NADLoop = new List();

            //  Begin NAD Group 1
            var nadLoop1 = new Loop_NAD_PRICAT();

            //  Buyer is identified by GLN 5412345000020
            nadLoop1.NAD = new NAD();
            nadLoop1.NAD.Partyqualifier_01 = "BY";
            nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082();
            nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyididentification_01 = "5412345000020";
            nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistresponsibleagencycoded_03 = "9";

            //  Repeating RFF NAD Groups
            nadLoop1.RFFLoop = new List();

            //  Begin RFF NAD Group
            var rffNadLoop1 = new Loop_RFF_PRICAT();

            //  Buyer’s VAT number VR12345
            rffNadLoop1.RFF = new RFF();
            rffNadLoop1.RFF.REFERENCE_01 = new C506();
            rffNadLoop1.RFF.REFERENCE_01.Referencequalifier_01 = "VA";
            rffNadLoop1.RFF.REFERENCE_01.Referencenumber_02 = "VR12345";

            //  End RFF NAD Group
            nadLoop1.RFFLoop.Add(rffNadLoop1);

            //  End NAD Group 1
            result.NADLoop.Add(nadLoop1);

            //  Begin NAD Group 2
            var nadLoop2 = new Loop_NAD_PRICAT();

            //  Supplier is identified by GLN 4012345500004
            nadLoop2.NAD = new NAD();
            nadLoop2.NAD.Partyqualifier_01 = "SU";
            nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082();
            nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyididentification_01 = "4012345500004";
            nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistresponsibleagencycoded_03 = "9";

            //  Repeating RFF NAD Groups
            nadLoop2.RFFLoop = new List();

            //  Begin RFF NAD Group
            var rffNadLoop2 = new Loop_RFF_PRICAT();

            //  Supplier’s VAT number is VR95745
            rffNadLoop2.RFF = new RFF();
            rffNadLoop2.RFF.REFERENCE_01 = new C506();
            rffNadLoop2.RFF.REFERENCE_01.Referencequalifier_01 = "VA";
            rffNadLoop2.RFF.REFERENCE_01.Referencenumber_02 = "VR95745";

            //  End RFF NAD Group
            nadLoop2.RFFLoop.Add(rffNadLoop2);

            //  End NAD Group 2
            result.NADLoop.Add(nadLoop2);

            //  Repeating CUX Groups
            result.CUXLoop = new List();

            //  Begin CUX Group
            var cuxLoop = new Loop_CUX_PRICAT();

            //  Price list currency is Euros
            cuxLoop.CUX = new CUX();
            cuxLoop.CUX.CURRENCYDETAILS_01 = new C504();
            cuxLoop.CUX.CURRENCYDETAILS_01.Currencydetailsqualifier_01 = "2";
            cuxLoop.CUX.CURRENCYDETAILS_01.Currencycoded_02 = "EUR";
            cuxLoop.CUX.CURRENCYDETAILS_01.Currencyqualifier_03 = "8";

            //  End CUX Group
            result.CUXLoop.Add(cuxLoop);

            //  Repeating PGI Groups
            result.PGILoop = new List();

            //  Begin PGI Group
            var pgiLoop1 = new Loop_PGI_PRICAT();

            //  Product group containing no price group
            pgiLoop1.PGI = new PGI();
            pgiLoop1.PGI.Productgrouptypecoded_01 = "2";

            //  Repeating LIN PGI Groups
            pgiLoop1.LINLoop = new List();

            //  Begin LIN PGI Group 1
            var linPgiLoop1 = new Loop_LIN_PRICAT();

            //  Line item 1, an addition, is identified by GTIN 5410738377131
            linPgiLoop1.LIN = new LIN();
            linPgiLoop1.LIN.Lineitemnumber_01 = "1";
            linPgiLoop1.LIN.Actionrequestnotificationcoded_02 = "1";
            linPgiLoop1.LIN.ITEMNUMBERIDENTIFICATION_03 = new C212();
            linPgiLoop1.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumber_01 = "5410738377131";
            linPgiLoop1.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumbertypecoded_02 = "SRV";

            //  Repeating PIA
            linPgiLoop1.PIA = new List();

            //  Supplier’s article number CU32555 is provided as an additional identification
            var piaLin1 = new PIA();
            piaLin1.Productidfunctionqualifier_01 = "1";
            piaLin1.ITEMNUMBERIDENTIFICATION_02 = new C212();
            piaLin1.ITEMNUMBERIDENTIFICATION_02.Itemnumber_01 = "CU32555";
            piaLin1.ITEMNUMBERIDENTIFICATION_02.Itemnumbertypecoded_02 = "SA";
            linPgiLoop1.PIA.Add(piaLin1);

            //  Repeating IMD
            linPgiLoop1.IMD = new List();

            //  Current line item is a consumer unit
            var imdLin1 = new IMD();
            imdLin1.Itemdescriptiontypecoded_01 = "C";
            imdLin1.ITEMDESCRIPTION_03 = new C273();
            imdLin1.ITEMDESCRIPTION_03.Itemdescriptionidentification_01 = "CU";
            imdLin1.ITEMDESCRIPTION_03.Codelistresponsibleagencycoded_03 = "9";
            linPgiLoop1.IMD.Add(imdLin1);

            //  Product description
            var imdLin2 = new IMD();
            imdLin2.Itemdescriptiontypecoded_01 = "F";
            imdLin2.ITEMDESCRIPTION_03 = new C273();
            imdLin2.ITEMDESCRIPTION_03.Itemdescription_04 = "HEALTHIEST CORN CRISPIES";
            imdLin2.ITEMDESCRIPTION_03.Itemdescription_05 = "BOX";
            linPgiLoop1.IMD.Add(imdLin2);

            //  Repeating MEA
            linPgiLoop1.MEA = new List();

            //  The net weight of the consumer unit is 250 grms
            var mea = new MEA();
            mea.Measurementapplicationqualifier_01 = "PD";
            mea.MEASUREMENTDETAILS_02 = new C502();
            mea.MEASUREMENTDETAILS_02.Measurementdimensioncoded_01 = "AAA";
            mea.MEASUREMENTDETAILS_02.Measurementsignificancecoded_02 = "4";
            mea.VALUERANGE_03 = new C174();
            mea.VALUERANGE_03.Measureunitqualifier_01 = "GRM";
            mea.VALUERANGE_03.Measurementvalue_02 = "250";
            linPgiLoop1.MEA.Add(mea);

            //  Repeating HAN
            linPgiLoop1.HAN = new List();

            //  The product is foodstuffs
            var hanLin1 = new HAN();
            hanLin1.HANDLINGINSTRUCTIONS_01 = new C524();
            hanLin1.HANDLINGINSTRUCTIONS_01.Handlinginstructionscoded_01 = "EAT";
            hanLin1.HANDLINGINSTRUCTIONS_01.Codelistresponsibleagencycoded_03 = "9";
            linPgiLoop1.HAN.Add(hanLin1);

            //  Repeating TAX LIN Groups
            linPgiLoop1.TAXLoop = new List();

            //  Begin TAX LIN Group
            var taxLin1 = new Loop_TAX_PRICAT();

            //  The product is subject to the standard rate of 21% VAT
            taxLin1.TAX = new TAX();
            taxLin1.TAX.Dutytaxfeefunctionqualifier_01 = "7";
            taxLin1.TAX.DUTYTAXFEETYPE_02 = new C241();
            taxLin1.TAX.DUTYTAXFEETYPE_02.Dutytaxfeetypecoded_01 = "VAT";
            taxLin1.TAX.DUTYTAXFEEDETAIL_05 = new C243();
            taxLin1.TAX.DUTYTAXFEEDETAIL_05.Dutytaxfeerate_04 = "21";
            taxLin1.TAX.Dutytaxfeecategorycoded_06 = "S";

            //  End TAX LIN Group
            linPgiLoop1.TAXLoop.Add(taxLin1);

            //  Repeating PRI LIN Groups
            linPgiLoop1.PRILoop = new List();

            //  Begin PRI LIN Group
            var priLinLoop1 = new Loop_PRI_PRICAT_2();

            //  The suggested retail information price, including allowances / charges and taxes, is 40
            priLinLoop1.PRI = new PRI();
            priLinLoop1.PRI.PRICEINFORMATION_01 = new C509();
            priLinLoop1.PRI.PRICEINFORMATION_01.Pricequalifier_01 = "AAE";
            priLinLoop1.PRI.PRICEINFORMATION_01.Price_02 = "40";
            priLinLoop1.PRI.PRICEINFORMATION_01.Pricetypecoded_03 = "CA";
            priLinLoop1.PRI.PRICEINFORMATION_01.Pricetypequalifier_04 = "SRP";

            //  End PRI LIN Group
            linPgiLoop1.PRILoop.Add(priLinLoop1);

            //  Repeating PAC LIN Groups
            linPgiLoop1.PACLoop = new List();

            //  Begin PAC LIN Group
            var pacLin1 = new Loop_PAC_PRICAT();

            //  The consumer unit is packaged in a box
            pacLin1.PAC = new PAC();
            pacLin1.PAC.PACKAGETYPE_03 = new C202();
            pacLin1.PAC.PACKAGETYPE_03.Typeofpackagesidentification_01 = "BX";

            //  Repeating MEA
            pacLin1.MEA = new List();

            //  The height of the box is 200 mm
            var meaPac1 = new MEA();
            meaPac1.Measurementapplicationqualifier_01 = "PD";
            meaPac1.MEASUREMENTDETAILS_02 = new C502();
            meaPac1.MEASUREMENTDETAILS_02.Measurementdimensioncoded_01 = "HT";
            meaPac1.VALUERANGE_03 = new C174();
            meaPac1.VALUERANGE_03.Measureunitqualifier_01 = "MMT";
            meaPac1.VALUERANGE_03.Measurementvalue_02 = "200";
            pacLin1.MEA.Add(meaPac1);

            //  The length of the box is 80 mm
            var meaPac2 = new MEA();
            meaPac2.Measurementapplicationqualifier_01 = "PD";
            meaPac2.MEASUREMENTDETAILS_02 = new C502();
            meaPac2.MEASUREMENTDETAILS_02.Measurementdimensioncoded_01 = "LN";
            meaPac2.VALUERANGE_03 = new C174();
            meaPac2.VALUERANGE_03.Measureunitqualifier_01 = "MMT";
            meaPac2.VALUERANGE_03.Measurementvalue_02 = "80";
            pacLin1.MEA.Add(meaPac2);

            //  The width of the box is 30 mm
            var meaPac3 = new MEA();
            meaPac3.Measurementapplicationqualifier_01 = "PD";
            meaPac3.MEASUREMENTDETAILS_02 = new C502();
            meaPac3.MEASUREMENTDETAILS_02.Measurementdimensioncoded_01 = "WD";
            meaPac3.VALUERANGE_03 = new C174();
            meaPac3.VALUERANGE_03.Measureunitqualifier_01 = "MMT";
            meaPac3.VALUERANGE_03.Measurementvalue_02 = "30";
            pacLin1.MEA.Add(meaPac3);

            //  End PAC LIN Group
            linPgiLoop1.PACLoop.Add(pacLin1);

            //  End LIN PGI Group 1
            pgiLoop1.LINLoop.Add(linPgiLoop1);

            //  Begin LIN PGI Group 2
            var linPgiLoop2 = new Loop_LIN_PRICAT();

            //  Line item 2, an addition, is identified by GTIN 5410738377117
            linPgiLoop2.LIN = new LIN();
            linPgiLoop2.LIN.Lineitemnumber_01 = "2";
            linPgiLoop2.LIN.Actionrequestnotificationcoded_02 = "1";
            linPgiLoop2.LIN.ITEMNUMBERIDENTIFICATION_03 = new C212();
            linPgiLoop2.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumber_01 = "5410738377117";
            linPgiLoop2.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumbertypecoded_02 = "SRV";

            //  Repeating PIA
            linPgiLoop2.PIA = new List();

            //  Supplier’s article number TU32555 is provided as an additional identification
            var piaLin2 = new PIA();
            piaLin2.Productidfunctionqualifier_01 = "1";
            piaLin2.ITEMNUMBERIDENTIFICATION_02 = new C212();
            piaLin2.ITEMNUMBERIDENTIFICATION_02.Itemnumber_01 = "TU32555";
            piaLin2.ITEMNUMBERIDENTIFICATION_02.Itemnumbertypecoded_02 = "SA";
            linPgiLoop2.PIA.Add(piaLin2);

            //  Repeating IMD
            linPgiLoop2.IMD = new List();

            //  Current line item is a trade unit
            var imdLin3 = new IMD();
            imdLin3.Itemdescriptiontypecoded_01 = "C";
            imdLin3.ITEMDESCRIPTION_03 = new C273();
            imdLin3.ITEMDESCRIPTION_03.Itemdescriptionidentification_01 = "TU";
            imdLin3.ITEMDESCRIPTION_03.Codelistresponsibleagencycoded_03 = "9";
            linPgiLoop2.IMD.Add(imdLin3);

            //  Product description
            var imdLin4 = new IMD();
            imdLin4.Itemdescriptiontypecoded_01 = "F";
            imdLin4.ITEMDESCRIPTION_03 = new C273();
            imdLin4.ITEMDESCRIPTION_03.Itemdescription_04 = "CORN CRISPIES";
            imdLin4.ITEMDESCRIPTION_03.Itemdescription_05 = "CASE";
            linPgiLoop2.IMD.Add(imdLin4);

            //  Repeating HAN
            linPgiLoop2.HAN = new List();

            //  The product is foodstuffs
            var hanLin2 = new HAN();
            hanLin2.HANDLINGINSTRUCTIONS_01 = new C524();
            hanLin2.HANDLINGINSTRUCTIONS_01.Handlinginstructionscoded_01 = "EAT";
            hanLin2.HANDLINGINSTRUCTIONS_01.Codelistresponsibleagencycoded_03 = "9";
            linPgiLoop2.HAN.Add(hanLin2);

            //  Repeating ALI
            linPgiLoop2.ALI = new List();

            //  Country of origin is Belgium
            var aliLin1 = new ALI();
            aliLin1.Countryoforigincoded_01 = "BE";
            linPgiLoop2.ALI.Add(aliLin1);

            //  Repeating TAX LIN Groups
            linPgiLoop2.TAXLoop = new List();

            //  Begin TAX LIN Group
            var taxLin2 = new Loop_TAX_PRICAT();

            //  Product is subject to the standard VAT rate of 21%
            taxLin2.TAX = new TAX();
            taxLin2.TAX.Dutytaxfeefunctionqualifier_01 = "7";
            taxLin2.TAX.DUTYTAXFEETYPE_02 = new C241();
            taxLin2.TAX.DUTYTAXFEETYPE_02.Dutytaxfeetypecoded_01 = "VAT";
            taxLin2.TAX.DUTYTAXFEEDETAIL_05 = new C243();
            taxLin2.TAX.DUTYTAXFEEDETAIL_05.Dutytaxfeerate_04 = "21";
            taxLin2.TAX.Dutytaxfeecategorycoded_06 = "S";

            //  End TAX LIN Group
            linPgiLoop2.TAXLoop.Add(taxLin2);

            //  Repeating PRI LIN Groups
            linPgiLoop2.PRILoop = new List();

            //  Begin PRI LIN Group
            var priLinLoop2 = new Loop_PRI_PRICAT_2();

            //  The calculation gross price for the product is 500
            priLinLoop2.PRI = new PRI();
            priLinLoop2.PRI.PRICEINFORMATION_01 = new C509();
            priLinLoop2.PRI.PRICEINFORMATION_01.Pricequalifier_01 = "AAB";
            priLinLoop2.PRI.PRICEINFORMATION_01.Price_02 = "500";
            priLinLoop2.PRI.PRICEINFORMATION_01.Pricetypecoded_03 = "CA";

            //  Repeating ALC LIN Groups
            linPgiLoop2.ALCLoop = new List();

            //  Begin ALC LIN Group
            var alcLin1 = new Loop_ALC_PRICAT();

            //  An allowance exists for this product
            alcLin1.ALC = new ALC();
            alcLin1.ALC.Allowanceorchargequalifier_01 = "A";
            alcLin1.ALC.Calculationsequenceindicatorcoded_04 = "1";

            //  PCD Group
            alcLin1.PCDLoop = new Loop_PCD_PRICAT();

            //  Allowance of 8%
            alcLin1.PCDLoop.PCD = new PCD();
            alcLin1.PCDLoop.PCD.PERCENTAGEDETAILS_01 = new C501();
            alcLin1.PCDLoop.PCD.PERCENTAGEDETAILS_01.Percentagequalifier_01 = "3";
            alcLin1.PCDLoop.PCD.PERCENTAGEDETAILS_01.Percentage_02 = "8";

            //  Is available on purchase of a minimum quantity of 48
            alcLin1.PCDLoop.RNG = new RNG();
            alcLin1.PCDLoop.RNG.Rangetypequalifier_01 = "1";
            alcLin1.PCDLoop.RNG.RANGE_02 = new C280();
            alcLin1.PCDLoop.RNG.RANGE_02.Measureunitqualifier_01 = "PCE";
            alcLin1.PCDLoop.RNG.RANGE_02.Rangeminimum_02 = "48";

            //  End ALC LIN Group
            linPgiLoop2.ALCLoop.Add(alcLin1);

            //  End PRI LIN Group
            linPgiLoop2.PRILoop.Add(priLinLoop2);

            //  Repeating PAC LIN Groups
            linPgiLoop2.PACLoop = new List();

            //  Begin PAC LIN Group
            var pacLin2 = new Loop_PAC_PRICAT();

            //  The product is packaged in a carton
            pacLin2.PAC = new PAC();
            pacLin2.PAC.PACKAGETYPE_03 = new C202();
            pacLin2.PAC.PACKAGETYPE_03.Typeofpackagesidentification_01 = "CT";

            //  End PAC LIN Group
            linPgiLoop2.PACLoop.Add(pacLin2);

            //  End LIN PGI Group 2
            pgiLoop1.LINLoop.Add(linPgiLoop2);

            //  Begin LIN PGI Group 3
            var linPgiLoop3 = new Loop_LIN_PRICAT();

            //  Line number 3, identified by GTIN 5410738377131, is a sub-line of line number 2
            linPgiLoop3.LIN = new LIN();
            linPgiLoop3.LIN.Lineitemnumber_01 = "3";
            linPgiLoop3.LIN.Actionrequestnotificationcoded_02 = "1";
            linPgiLoop3.LIN.ITEMNUMBERIDENTIFICATION_03 = new C212();
            linPgiLoop3.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumber_01 = "5410738377131";
            linPgiLoop3.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumbertypecoded_02 = "SRV";
            linPgiLoop3.LIN.SUBLINEINFORMATION_04 = new C829();
            linPgiLoop3.LIN.SUBLINEINFORMATION_04.Sublineindicatorcoded_01 = "1";
            linPgiLoop3.LIN.SUBLINEINFORMATION_04.Lineitemnumber_02 = "2";

            //  Repeating QTY
            linPgiLoop3.QTY = new List();

            //  Number of consumer units in trade unit is 48
            var qtyLin1 = new QTY();
            qtyLin1.QUANTITYDETAILS_01 = new C186();
            qtyLin1.QUANTITYDETAILS_01.Quantityqualifier_01 = "45E";
            qtyLin1.QUANTITYDETAILS_01.Quantity_02 = "48";
            linPgiLoop3.QTY.Add(qtyLin1);

            //  End LIN PGI Group 3
            pgiLoop1.LINLoop.Add(linPgiLoop3);

            //  Begin LIN PGI Group 4
            var linPgiLoop4 = new Loop_LIN_PRICAT();

            //  Line item 4, an addition, is identified by GTIN 5410738251028
            linPgiLoop4.LIN = new LIN();
            linPgiLoop4.LIN.Lineitemnumber_01 = "4";
            linPgiLoop4.LIN.Actionrequestnotificationcoded_02 = "1";
            linPgiLoop4.LIN.ITEMNUMBERIDENTIFICATION_03 = new C212();
            linPgiLoop4.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumber_01 = "5410738251028";
            linPgiLoop4.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumbertypecoded_02 = "SRV";

            //  Repeating PIA
            linPgiLoop4.PIA = new List();

            //  Supplier’s article number PN32555 is provided as an  additional identification
            var piaLin3 = new PIA();
            piaLin3.Productidfunctionqualifier_01 = "1";
            piaLin3.ITEMNUMBERIDENTIFICATION_02 = new C212();
            piaLin3.ITEMNUMBERIDENTIFICATION_02.Itemnumber_01 = "PN32555";
            piaLin3.ITEMNUMBERIDENTIFICATION_02.Itemnumbertypecoded_02 = "SA";
            linPgiLoop4.PIA.Add(piaLin3);

            //  Repeating IMD
            linPgiLoop4.IMD = new List();

            //  Product is a despatch unit
            var imdLin5 = new IMD();
            imdLin5.Itemdescriptiontypecoded_01 = "C";
            imdLin5.ITEMDESCRIPTION_03 = new C273();
            imdLin5.ITEMDESCRIPTION_03.Itemdescriptionidentification_01 = "DU";
            imdLin5.ITEMDESCRIPTION_03.Codelistqualifier_02 = "9";
            linPgiLoop4.IMD.Add(imdLin5);

            //  Product description
            var imdLin6 = new IMD();
            imdLin6.Itemdescriptiontypecoded_01 = "F";
            imdLin6.ITEMDESCRIPTION_03 = new C273();
            imdLin6.ITEMDESCRIPTION_03.Itemdescription_04 = "CORN CRISPIES";
            imdLin6.ITEMDESCRIPTION_03.Itemdescription_05 = "PALLET";
            linPgiLoop4.IMD.Add(imdLin6);

            //  Repeating HAN
            linPgiLoop4.HAN = new List();

            //  The product is foodstuffs
            var hanLin3 = new HAN();
            hanLin3.HANDLINGINSTRUCTIONS_01 = new C524();
            hanLin3.HANDLINGINSTRUCTIONS_01.Handlinginstructionscoded_01 = "EAT";
            hanLin3.HANDLINGINSTRUCTIONS_01.Codelistresponsibleagencycoded_03 = "9";
            linPgiLoop4.HAN.Add(hanLin3);

            //  The product is susceptible to frost damage
            var hanLin4 = new HAN();
            hanLin4.HANDLINGINSTRUCTIONS_01 = new C524();
            hanLin4.HANDLINGINSTRUCTIONS_01.Handlinginstructionscoded_01 = "FTD";
            hanLin4.HANDLINGINSTRUCTIONS_01.Codelistresponsibleagencycoded_03 = "9";
            linPgiLoop4.HAN.Add(hanLin4);

            //  Repeating TAX LIN Groups
            linPgiLoop4.TAXLoop = new List();

            //  Begin TAX LIN Group
            var taxLin3 = new Loop_TAX_PRICAT();

            //  The product is subject to the standard VAT rate of 21%
            taxLin3.TAX = new TAX();
            taxLin3.TAX.Dutytaxfeefunctionqualifier_01 = "7";
            taxLin3.TAX.DUTYTAXFEETYPE_02 = new C241();
            taxLin3.TAX.DUTYTAXFEETYPE_02.Dutytaxfeetypecoded_01 = "VAT";
            taxLin3.TAX.DUTYTAXFEEDETAIL_05 = new C243();
            taxLin3.TAX.DUTYTAXFEEDETAIL_05.Dutytaxfeerate_04 = "21";
            taxLin3.TAX.Dutytaxfeecategorycoded_06 = "S";

            //  End TAX LIN Group
            linPgiLoop4.TAXLoop.Add(taxLin3);

            //  Repeating PRI LIN Groups
            linPgiLoop4.PRILoop = new List();

            //  Begin PRI LIN Group
            var priLinLoop3 = new Loop_PRI_PRICAT_2();

            //  The calculation net price for the product is 24000
            priLinLoop3.PRI = new PRI();
            priLinLoop3.PRI.PRICEINFORMATION_01 = new C509();
            priLinLoop3.PRI.PRICEINFORMATION_01.Pricequalifier_01 = "AAA";
            priLinLoop3.PRI.PRICEINFORMATION_01.Price_02 = "24000";
            priLinLoop3.PRI.PRICEINFORMATION_01.Pricetypecoded_03 = "CA";

            //  End PRI LIN Group
            linPgiLoop4.PRILoop.Add(priLinLoop3);

            //  Repeating ALC LIN Groups
            linPgiLoop4.ALCLoop = new List();

            //  Begin ALC LIN Group
            var alcLin2 = new Loop_ALC_PRICAT();

            //  An allowance exists for this product
            alcLin2.ALC = new ALC();
            alcLin2.ALC.Allowanceorchargequalifier_01 = "A";
            alcLin2.ALC.Calculationsequenceindicatorcoded_04 = "1";

            //  PCD Group
            alcLin2.PCDLoop = new Loop_PCD_PRICAT();

            //  Allowance of 10%
            alcLin2.PCDLoop.PCD = new PCD();
            alcLin2.PCDLoop.PCD.PERCENTAGEDETAILS_01 = new C501();
            alcLin2.PCDLoop.PCD.PERCENTAGEDETAILS_01.Percentagequalifier_01 = "1";
            alcLin2.PCDLoop.PCD.PERCENTAGEDETAILS_01.Percentage_02 = "10";

            //  Is available on purchases of a minimum quantity of 50
            alcLin2.PCDLoop.RNG = new RNG();
            alcLin2.PCDLoop.RNG.Rangetypequalifier_01 = "1";
            alcLin2.PCDLoop.RNG.RANGE_02 = new C280();
            alcLin2.PCDLoop.RNG.RANGE_02.Measureunitqualifier_01 = "PCE";
            alcLin2.PCDLoop.RNG.RANGE_02.Rangeminimum_02 = "50";

            //  End ALC LIN Group
            linPgiLoop4.ALCLoop.Add(alcLin2);

            //  Repeating PAC LIN Groups
            linPgiLoop4.PACLoop = new List();

            //  Begin PAC LIN Group
            var pacLin3 = new Loop_PAC_PRICAT();

            //  The product is packaged on an ISO 1 pallet
            pacLin3.PAC = new PAC();
            pacLin3.PAC.PACKAGETYPE_03 = new C202();
            pacLin3.PAC.PACKAGETYPE_03.Typeofpackagesidentification_01 = "201";
            pacLin3.PAC.PACKAGETYPE_03.Codelistresponsibleagencycoded_03 = "9";

            //  End PAC LIN Group
            linPgiLoop4.PACLoop.Add(pacLin3);

            //  End LIN PGI Group 4
            pgiLoop1.LINLoop.Add(linPgiLoop4);

            //  Begin LIN PGI Group 5
            var linPgiLoop5 = new Loop_LIN_PRICAT();

            //  Line number 5, identified by GTIN 5410738377117 , is a sub-line of line number 4
            linPgiLoop5.LIN = new LIN();
            linPgiLoop5.LIN.Lineitemnumber_01 = "5";
            linPgiLoop5.LIN.Actionrequestnotificationcoded_02 = "1";
            linPgiLoop5.LIN.ITEMNUMBERIDENTIFICATION_03 = new C212();
            linPgiLoop5.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumber_01 = "5410738377117";
            linPgiLoop5.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumbertypecoded_02 = "SRV";
            linPgiLoop5.LIN.SUBLINEINFORMATION_04 = new C829();
            linPgiLoop5.LIN.SUBLINEINFORMATION_04.Sublineindicatorcoded_01 = "1";
            linPgiLoop5.LIN.SUBLINEINFORMATION_04.Lineitemnumber_02 = "4";

            //  Repeating QTY
            linPgiLoop5.QTY = new List();

            //  Number of traded units in despatch unit is 24
            var qtyLin2 = new QTY();
            qtyLin2.QUANTITYDETAILS_01 = new C186();
            qtyLin2.QUANTITYDETAILS_01.Quantityqualifier_01 = "45E";
            qtyLin2.QUANTITYDETAILS_01.Quantity_02 = "24";
            linPgiLoop5.QTY.Add(qtyLin2);

            //  End LIN PGI Group 5
            pgiLoop1.LINLoop.Add(linPgiLoop5);

            //  End PGI Group
            result.PGILoop.Add(pgiLoop1);

            return result;
        }
    }
}

More operations in ediFabric .NET

PRICAT questions

What does PRICAT carry besides prices?

Product master data: identifiers, descriptions, dimensions, weights, packaging hierarchies and validity dates.

How does PRICAT relate to GDSN?

Many retailers moved product data synchronization to the GS1 Global Data Synchronisation Network, but PRICAT is still used for prices and for partners outside GDSN.

What is the X12 equivalent?

The X12 832 price/sales catalog.

How do I parse and generate EANCOM PRICAT files in .NET?

In .NET, install EdiFabric and EdiFabric.Templates.Edifact, read the file with EdifactReader into TSPRICAT objects and write them back with EdifactWriter. From any other language, post the file to the ediFabric Cloud REST API, which returns the same structure as JSON and converts JSON back to EANCOM.

Resources

Parse your first EANCOM PRICAT in five minutes

The Community plan is free forever and needs no credit card. It includes ediFabric .NET, Native and Cloud with one serial key.

Sign up free Validate EDI files free