Documentation

EDIFACT CUSCAR EDI Template

Article author
Admin
  • Updated

EDIFACT CUSCAR EDI Template

EDI Tools for .NET uses C# classes to represent the layout of EDI transactions. These classes are nothing more than standard C# .NET classes with some extra markup and are referred to as EDI templates.

 

EDIFACT CUSCAR Specification

EDIFACT CUSCAR specification is available at:

 

EDIFACT CUSCAR Sample File

EDIFACT CUSCAR sample file is available at:

 

EDI Tools for .NET C# Examples

The example below is part of the EDI Tools for .NET C# Code Examples.

Download EDI C# Examples

The Parse & Generate EDIFACT CUSCAR code is also available on GitHub

 

Additional operations for EDIFACT CUSCAR

 

EDI template for EDIFACT CUSCAR

namespace EdiFabric.Templates.EdifactD03B
{
using System;
using System.Collections.Generic;
using EdiFabric.Core.Annotations.Edi;
using EdiFabric.Core.Annotations.Validation;
using EdiFabric.Core.Model.Edi;
using EdiFabric.Core.Model.Edi.Edifact;

/// 
/// Customs cargo report message
/// 
[Serializable()]
[Message("EDIFACT", "D03B", "CUSCAR")]
public class TSCUSCAR : EdiMessage
{
	/// 
	/// Message Header
	/// 
	[Pos(1)]
	public UNH UNH { get; set; }
	/// 
	/// BEGINNING OF MESSAGE
	/// 
	[Pos(2)]
	public BGM BGM { get; set; }
	/// 
	/// DATE/TIME/PERIOD
	/// 
	[Pos(3)]
	public List DTM { get; set; }
	/// 
	/// PLACE/LOCATION IDENTIFICATION
	/// 
	[Pos(4)]
	public List LOC { get; set; }
	/// 
	/// QUANTITY
	/// 
	[Pos(5)]
	public List QTY { get; set; }
	/// 
	/// Loop for REFERENCE
	/// 
	[Pos(6)]
	public List RFFLoop { get; set; }
	/// 
	/// Loop for NAME AND ADDRESS
	/// 
	[Pos(7)]
	public List NADLoop { get; set; }
	/// 
	/// FREE TEXT
	/// 
	[Pos(8)]
	public List FTX { get; set; }
	/// 
	/// Loop for TRANSPORT INFORMATION
	/// 
	[Pos(9)]
	public List TDTLoop { get; set; }
	/// 
	/// PROCESSING INFORMATION
	/// 
	[Pos(10)]
	public List GEI { get; set; }
	/// 
	/// Loop for EQUIPMENT DETAILS
	/// 
	[Pos(11)]
	public List EQDLoop { get; set; }
	/// 
	/// CONTROL TOTAL
	/// 
	[Pos(12)]
	public List CNT { get; set; }
	/// 
	/// Loop for CONSIGNMENT INFORMATION
	/// 
	[Pos(13)]
	public List CNILoop { get; set; }
	/// 
	/// Loop for AUTHENTICATION RESULT
	/// 
	[Pos(14)]
	public Loop_AUT_CUSCAR AUTLoop { get; set; }
	/// 
	/// Message Trailer
	/// 
	[Pos(15)]
	public UNT UNT { get; set; }
}

/// 
/// Loop for AUTHENTICATION RESULT
/// 
[Serializable()]
[Group(typeof(AUT))]
public class Loop_AUT_CUSCAR
{
	
	/// 
	/// AUTHENTICATION RESULT
	/// 
	[Pos(1)]
	public AUT AUT { get; set; }
	/// 
	/// DATE/TIME/PERIOD
	/// 
	[Pos(2)]
	public List DTM { get; set; }
	/// 
	/// REFERENCE
	/// 
	[Pos(3)]
	public List RFF { get; set; }
}

/// 
/// Loop for CONSIGNMENT INFORMATION
/// 
[Serializable()]
[Group(typeof(CNI))]
public class Loop_CNI_CUSCAR
{
	
	/// 
	/// CONSIGNMENT INFORMATION
	/// 
	[Pos(1)]
	public CNI CNI { get; set; }
	/// 
	/// CONTROL TOTAL
	/// 
	[Pos(2)]
	public List CNT { get; set; }
	/// 
	/// DOCUMENT/MESSAGE DETAILS
	/// This is specific to the US Customs - https://www.cbp.gov/trade/ace/truck-manifest/edi/message/electronic-truck-manifest
	/// 
	[Pos(3)]
	public List DOC { get; set; }
	/// 
	/// Loop for REFERENCE
	/// 
	[Pos(4)]
	public List RFFLoop { get; set; }
}

/// 
/// Loop for CONTACT INFORMATION
/// 
[Serializable()]
[Group(typeof(CTA))]
public class Loop_CTA_CUSCAR
{
	
	/// 
	/// CONTACT INFORMATION
	/// 
	[Pos(1)]
	public CTA CTA { get; set; }
	/// 
	/// COMMUNICATION CONTACT
	/// 
	[Pos(2)]
	public List COM { get; set; }
}

/// 
/// Loop for EQUIPMENT DETAILS
/// 
[Serializable()]
[Group(typeof(EQD))]
public class Loop_EQD_CUSCAR
{
	
	/// 
	/// EQUIPMENT DETAILS
	/// 
	[Pos(1)]
	public EQD EQD { get; set; }
	/// 
	/// TRANSPORT SERVICE REQUIREMENTS
	/// 
	[Pos(2)]
	public List TSR { get; set; }
	/// 
	/// MEASUREMENTS
	/// 
	[Pos(3)]
	public List MEA { get; set; }
	/// 
	/// DIMENSIONS
	/// 
	[Pos(4)]
	public List DIM { get; set; }
	/// 
	/// SEAL NUMBER
	/// 
	[Pos(5)]
	public List SEL { get; set; }
	/// 
	/// NAME AND ADDRESS
	/// 
	[Pos(6)]
	public List NAD { get; set; }
	/// 
	/// PROCESSING INFORMATION
	/// 
	[Pos(7)]
	public List GEI { get; set; }
	/// 
	/// PLACE/LOCATION IDENTIFICATION
	/// 
	[Pos(8)]
	public LOC LOC { get; set; }
	/// 
	/// Loop for TEMPERATURE
	/// 
	[Pos(9)]
	public List TMPLoop { get; set; }
	/// 
	/// Loop for REFERENCE
	/// This is specific to the US Customs - https://www.cbp.gov/trade/ace/truck-manifest/edi/message/electronic-truck-manifest
	/// 
	[Pos(9)]
	public List RFFLoop { get; set; }        
}

/// 
/// Loop for PROCESSING INFORMATION
/// 
[Serializable()]
[Group(typeof(GEI))]
public class Loop_GEI_CUSCAR
{
	
	/// 
	/// PROCESSING INFORMATION
	/// 
	[Pos(1)]
	public GEI GEI { get; set; }
	/// 
	/// DATE/TIME/PERIOD
	/// 
	[Pos(2)]
	public List DTM { get; set; }
	/// 
	/// DOCUMENT/MESSAGE DETAILS
	/// 
	[Pos(3)]
	public List DOC { get; set; }
	/// 
	/// PACKAGE
	/// 
	[Pos(4)]
	public List PAC { get; set; }
	/// 
	/// MEASUREMENTS
	/// 
	[Pos(5)]
	public List MEA { get; set; }
}

/// 
/// Loop for GOODS ITEM DETAILS
/// 
[Serializable()]
[Group(typeof(GID))]
public class Loop_GID_CUSCAR
{
	
	/// 
	/// GOODS ITEM DETAILS
	/// 
	[Pos(1)]
	public GID GID { get; set; }
	/// 
	/// PACKAGE
	/// 
	[Pos(2)]
	public List PAC { get; set; }
	/// 
	/// HANDLING INSTRUCTIONS
	/// 
	[Pos(3)]
	public List HAN { get; set; }
	/// 
	/// FREE TEXT
	/// 
	[Pos(4)]
	public List FTX { get; set; }
	/// 
	/// MEASUREMENTS
	/// 
	[Pos(5)]
	public List MEA { get; set; }
	/// 
	/// MONETARY AMOUNT
	/// 
	[Pos(6)]
	public List MOA { get; set; }
	/// 
	/// SPLIT GOODS PLACEMENT
	/// 
	[Pos(7)]
	public List SGP { get; set; }
	/// 
	/// DANGEROUS GOODS
	/// 
	[Pos(8)]
	public List DGS { get; set; }
	/// 
	/// PACKAGE IDENTIFICATION
	/// 
	[Pos(9)]
	public List PCI { get; set; }
	/// 
	/// CUSTOMS STATUS OF GOODS
	/// 
	[Pos(10)]
	public CST CST { get; set; }
	/// 
	/// PLACE/LOCATION IDENTIFICATION
	/// 
	[Pos(11)]
	public List LOC { get; set; }
	/// 
	/// TRANSPORT MOVEMENT DETAILS
	/// 
	[Pos(12)]
	public List TMD { get; set; }
	/// 
	/// Loop for PROCESSING INFORMATION
	/// 
	[Pos(13)]
	public List GEILoop { get; set; }
	/// 
	/// Loop for QUANTITY
	/// 
	[Pos(14)]
	public List QTYLoop { get; set; }
}

/// 
/// Loop for NAME AND ADDRESS
/// 
[Serializable()]
[Group(typeof(NAD))]
public class Loop_NAD_CUSCAR
{
	
	/// 
	/// NAME AND ADDRESS
	/// 
	[Pos(1)]
	public NAD NAD { get; set; }
	/// 
	/// DATE/TIME/PERIOD
	/// 
	[Pos(2)]
	public DTM DTM { get; set; }
	/// 
	/// Loop for CONTACT INFORMATION
	/// 
	[Pos(3)]
	public List CTALoop { get; set; }
}

/// 
/// Loop for NAME AND ADDRESS
/// 
[Serializable()]
[Group(typeof(NAD))]
public class Loop_NAD_CUSCAR_2
{
	
	/// 
	/// NAME AND ADDRESS
	/// 
	[Pos(1)]
	public NAD NAD { get; set; }
	/// 
	/// DATE/TIME/PERIOD
	/// 
	[Pos(2)]
	public List DTM { get; set; }
	/// 
	/// REFERENCE
	/// 
	[Pos(3)]
	public List RFF { get; set; }
	/// 
	/// Loop for CONTACT INFORMATION
	/// 
	[Pos(4)]
	public List CTALoop { get; set; }
}

/// 
/// Loop for QUANTITY
/// 
[Serializable()]
[Group(typeof(QTY))]
public class Loop_QTY_CUSCAR
{
	
	/// 
	/// QUANTITY
	/// 
	[Pos(1)]
	public QTY QTY { get; set; }
	/// 
	/// FREE TEXT
	/// 
	[Pos(2)]
	public List FTX { get; set; }
}

/// 
/// Loop for QUANTITY
/// 
[Serializable()]
[Group(typeof(QTY))]
public class Loop_QTY_CUSCAR_2
{
	
	/// 
	/// QUANTITY
	/// 
	[Pos(1)]
	public QTY QTY { get; set; }
	/// 
	/// FREE TEXT
	/// 
	[Pos(2)]
	public FTX FTX { get; set; }
}

/// 
/// Loop for REFERENCE
/// 
[Serializable()]
[Group(typeof(RFF))]
public class Loop_RFF_CUSCAR
{
	
	/// 
	/// REFERENCE
	/// 
	[Pos(1)]
	public RFF RFF { get; set; }
	/// 
	/// DATE/TIME/PERIOD
	/// 
	[Pos(2)]
	public List DTM { get; set; }
}

/// 
/// Loop for REFERENCE
/// 
[Serializable()]
[Group(typeof(RFF))]
public class Loop_RFF_CUSCAR_2
{
	
	/// 
	/// REFERENCE
	/// 
	[Pos(1)]
	public RFF RFF { get; set; }
	/// 
	/// CONTROL TOTAL
	/// 
	[Pos(2)]
	public List CNT { get; set; }
	/// 
	/// MONETARY AMOUNT
	/// 
	[Pos(3)]
	public List MOA { get; set; }
	/// 
	/// PLACE/LOCATION IDENTIFICATION
	/// 
	[Pos(4)]
	public List LOC { get; set; }
	/// 
	/// PROCESSING INFORMATION
	/// 
	[Pos(5)]
	public List GEI { get; set; }
	/// 
	/// CURRENCIES
	/// 
	[Pos(6)]
	public List CUX { get; set; }
	/// 
	/// CHARGE PAYMENT INSTRUCTIONS
	/// 
	[Pos(7)]
	public List CPI { get; set; }
	/// 
	/// Loop for TRANSPORT INFORMATION
	/// 
	[Pos(8)]
	public List TDTLoop { get; set; }
	/// 
	/// Loop for NAME AND ADDRESS
	/// 
	[Pos(9)]
	public List NADLoop { get; set; }
	/// 
	/// Loop for QUANTITY
	/// 
	[Pos(10)]
	public List QTYLoop { get; set; }
	/// 
	/// Loop for GOODS ITEM DETAILS
	/// 
	[Pos(11)]
	public List GIDLoop { get; set; }
}

/// 
/// Loop for REFERENCE
/// 
[Serializable()]
[Group(typeof(RFF))]
public class Loop_RFF_CUSCAR_3
{
	
	/// 
	/// REFERENCE
	/// 
	[Pos(1)]
	public RFF RFF { get; set; }
	/// 
	/// TRANSPORT SERVICE REQUIREMENTS
	/// 
	[Pos(2)]
	public List TSR { get; set; }
}

/// 
/// Loop for REFERENCE
/// 
[Serializable()]
[Group(typeof(RFF))]
public class Loop_RFF_CUSCAR_4
{

	/// 
	/// REFERENCE
	/// 
	[Pos(1)]
	public RFF RFF { get; set; }
	/// 
	/// PLACE/LOCATION IDENTIFICATION
	/// 
	[Pos(2)]
	public List LOC { get; set; }
}

/// 
/// Loop for TRANSPORT INFORMATION
/// 
[Serializable()]
[Group(typeof(TDT))]
public class Loop_TDT_CUSCAR
{
	
	/// 
	/// TRANSPORT INFORMATION
	/// 
	[Pos(1)]
	public TDT TDT { get; set; }
	/// 
	/// PLACE/LOCATION IDENTIFICATION
	/// 
	[Pos(2)]
	public List LOC { get; set; }
	/// 
	/// DATE/TIME/PERIOD
	/// 
	[Pos(3)]
	public List DTM { get; set; }
}

/// 
/// Loop for TRANSPORT INFORMATION
/// 
[Serializable()]
[Group(typeof(TDT))]
public class Loop_TDT_CUSCAR_2
{
	
	/// 
	/// TRANSPORT INFORMATION
	/// 
	[Pos(1)]
	public TDT TDT { get; set; }
	/// 
	/// PLACE/LOCATION IDENTIFICATION
	/// 
	[Pos(2)]
	public List LOC { get; set; }
	/// 
	/// DATE/TIME/PERIOD
	/// 
	[Pos(3)]
	public List DTM { get; set; }
	/// 
	/// MEASUREMENTS
	/// 
	[Pos(4)]
	public List MEA { get; set; }
	/// 
	/// Loop for REFERENCE
	/// 
	[Pos(5)]
	public List RFFLoop { get; set; }
}

/// 
/// Loop for TEMPERATURE
/// 
[Serializable()]
[Group(typeof(TMP))]
public class Loop_TMP_CUSCAR
{
	
	/// 
	/// TEMPERATURE
	/// 
	[Pos(1)]
	public TMP TMP { get; set; }
	/// 
	/// RANGE DETAILS
	/// 
	[Pos(2)]
	public RNG RNG { get; set; }
}    
}
Share this:

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.