Documentation

Model Operations

Article author
Admin
  • Updated

EDI API uses OpenAPI models to represent all EDI transactions, such as invoices or purchase orders. Each model matches the rules as specified by the standard. Transaction models are used as part of X12Group's Transactions object and EdifactGroup's Transactions object.

 

Get Models

Gets all system EDI models or custom EDI models.

  • Path: /models
  • HTTP Verb: GET
  • Response Content-Type: application/json

Get Models Swagger

 

Errors

  • 200: Success
  • 500: Something went wrong on our end. Please report at support@edination.com

 

Parameters

  • system boolean

    Whether to get the system or the custom models. The default is true.

 

Get Transactions

Gets all transactions in the specified model.

  • Path: /models/{id}/transactions
  • HTTP Verb: GET
  • Response Content-Type: application/json

Get Transactions Swagger

 

Errors

  • 200: Success
  • 500: Something went wrong on our end. Please report at support@edination.com

 

Parameters

  • id string

    The model identifier.

  • system boolean

    Whether to get the system or the custom models. The default is true.

 

Get Model

Returns the model file as a stream. This operation is only applicable to custom models.

  • Path: /models/{id}
  • HTTP Verb: GET
  • Required API Key: Ocp-Apim-Subscription-Key
  • Response Content-Type: application/octet-stream

Get Model Swagger

 

Errors

  • 200: Success
  • 500: Something went wrong on our end. Please report at support@edination.com

 

Parameters

  • id string

    The model identifier.

 

Upload Model

Uploads a model file to a subscription. The model must be a valid .NET assembly compiled for .NET Core. We will be allowing other model types in the future. The file name can't begin with EdiNation and the file size must be less than 5 MB. This operation is only applicable to custom models.

  • Path: /models
  • HTTP Verb: POST
  • Required API Key: Ocp-Apim-Subscription-Key
  • Request Content-Type: multipart/form-data

Upload Model Swagger

 

Errors

  • 200: Success
  • 400: When the file stream is invalid or the form-data is not set properly. If the file isn't a valid .NET assembly or the file name starts with EdiNation. When the file is bigger than the limit.
  • 500: Something went wrong on our end. Please report at support@edination.com

 

Delete Model

Deletes the specified model. This operation is only applicable to custom models.

  • Path: /models/{id}
  • HTTP Verb: DELETE
  • Required API Key: Ocp-Apim-Subscription-Key

Delete Model Swagger

 

Errors

  • 200: Success
  • 500: Something went wrong on our end. Please report at support@edination.com

 

Parameters

  • id string

    The model identifier.

 

Share this:

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.