Documentation

NCPDP Operations

Article author
Admin
  • Updated

With EDI API you can translate NCPDP files to JSON (read NCPDP), translate JSON to NCPDP file (write NCPDP), or validate an NCPDP transaction (validate NCPDP).

 

Read NCPDP

Reads an NCPDP file and returns its contents translated to JSON as an array of NcpdpTransmission objects.

  • Path: /ncpdp/read
  • HTTP Verb: POST
  • Required API Key: Ocp-Apim-Subscription-Key
  • Request Content-Type: application/octet-stream or multipart/form-data
  • Request limit: 28.6 MB
  • Response Content-Type: application/json

 

Errors

  • 200: Success
  • 400: When the file stream is invalid or the form-data is not set properly.
  • 500: Something went wrong on our end. Please report at support@edination.com

The API will respond with HTTP 200 OK even if the contents of the file can't be translated. Error details will be included in the Result section of NcpdpTransmission.

 

Parameters

  • ignoreNullValues boolean

    Whether to ignore all null values in the response. The default is false.

  • charSet enumeration

    The encoding of the file contents. The default is utf-8.

    The available values are:

    Value Description
    utf-16 Unicode
    unicodeFFFE Unicode (Big endian)
    utf-32 Unicode (UTF-32)
    utf-32BE Unicode (UTF-32 Big endian)
    us-ascii US-ASCII
    iso-8859-1 Western European (ISO)
    utf-7 Unicode (UTF-7)
    utf-8 Unicode (UTF-8)
  • model string

    The model to use. By default, the API will infer the model based on the transaction and version identifiers.

 

Write NCPDP

Translates a NcpdpTransmission object to a raw NCPDP transmission and returns it as a stream.

  • Path: /ncpdp/write
  • HTTP Verb: POST
  • Required API Key: Ocp-Apim-Subscription-Key
  • Request Content-Type: application/json
  • Request limit: 28.6 MB
  • Response Content-Type: application/octet-stream

 

Errors

  • 200: Success
  • 400: When the NcpdpTransmission has an invalid JSON structure.
  • 500: Something went wrong on our end. Please report at support@edination.com

 

Parameters

  • noG1 boolean

    Whether to add the G1 header or not. The default is false, e.g. it's always produced with a G1.

  • charSet string

    The encoding of the resulting stream. The default is utf-8.

    The available values are:

    Value Description
    utf-16 Unicode
    unicodeFFFE Unicode (Big endian)
    utf-32 Unicode (UTF-32)
    utf-32BE Unicode (UTF-32 Big endian)
    us-ascii US-ASCII
    iso-8859-1 Western European (ISO)
    utf-7 Unicode (UTF-7)
    utf-8 Unicode (UTF-8)
  • trailerMessage string

    The optional Message_03 in the transmission trailer. By default, there is no message.

 

Validate HL7

Validates a NcpdpTransmission object according to the NCPDP standard rules for each version and transaction. Returns an OperationResult object with a status field and an array of error details if any.

  • Path: /ncpdp/validate
  • HTTP Verb: POST
  • Required API Key: Ocp-Apim-Subscription-Key
  • Request Content-Type: application/json
  • Request limit: 28.6 MB
  • Response Content-Type: application/json

 

Errors

  • 200: Success
  • 400: When the NcpdpTransmission has an invalid JSON structure.
  • 500: Something went wrong on our end. Please report at support@edination.com

 

Parameters

  • syntaxSet string

    In case you need to validate against a syntax set, different than the Default, populate this field with all of the allowed symbols, URL-escaped.

    The symbols added to this field will override the corresponding sets in the Default syntax set.

    • ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~` !@#$%^&*()_-=+\|{[]}:,<.>/?;'"
  • structureOnly boolean

    This is equivalent to HIPAA Snip level 1, where only the structure and control segments are validated. By default, this is set to false, however, if you want to not validate things such as data types, a number of repetitions, or dates, set this to true.

 

API Tutorials

To learn more about how to translate and validate EDI files with EDI API try these tutorials:

Share this:

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.