---
updatedAt: 2026-08-30T09:51:45.000Z
agentTools:
  projectIndex: https://developer.unimaze.com/llms.txt
---

# Send an EDI document

Uploads EDIFACT EDI document, or a SKOT flat file document and creates a message.

The data should be sent to the server using a raw binary format (`application/octet-stream`). You can also submit the data as a stream that is formatted as a base64-encoded ASCII text. In this case, the HTTP `Content-Type` header must be set to `application/base64`.

The document must be sent as the request body.

In this call the flat file is by default translated to `EDIFACT` file and is delivered according to the receiver specified in the document. To send an `EDIFACT` file, set the `isSkotSyntax` to false.

If the file uses `UTF-8` encoding, add `; charset=UTF-8"` to the `Content-Type`.

`Service` parameter of the message will be mapped accordingly to a transaction:

* `INVOIC` to `SubmitInvoice`,
* `ORDERS` to `SubmitOrder`,
* `ORDRSP` to `SubmitOrderResponse`,
* `PRICAT` to `SubmitCatalogue`,
* `RETANN` to `SubmitReturnAnnouncement`,
* `DESADV` to `SubmitDespatchAdvice`,
* `CUSDEC` to `SubmitCustomsDeclaration` and
* `CUSRES` to `SubmitCustomsResponse`.

`Action` parameter of the message will describe the format e.g. `EDIFACT.CUSDEC.96A`.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "MAPI EDI v1.0",
    "description": "<p>\n  <img src=\"https://files.readme.io/a8b41579878c59e9773979bad07ed2937a4aeb67c1a217a34cffdcdda1e274a5-dev-docs-migration.png\"\n       alt=\"Dev Docs – Under Construction\"\n       width=\"420\"/>\n</p>\n\n## 🚧 Documentation has moved!\n\n|  |  |\n|---|---|\n| The MAPI documentation is now available on our new developer portal:<br><br>👉 **[https://developer.unimaze.com](https://developer.unimaze.com)** | • You’ll find up-to-date guides, authentication details, integration instructions, and client generation guidance there.<br><br>• This Swagger UI remains available for API exploration and testing, but the new developer portal is now the primary source of truth.<br><br>• The new site will provide a better Developer Experience for testing. |\n",
    "termsOfService": "https://www.unimaze.com/terms-of-use/",
    "contact": {
      "name": "Unimaze Software",
      "url": "https://www.unimaze.com",
      "email": "info@unimaze.com"
    },
    "license": {
      "name": "Unimaze Software",
      "url": "https://www.unimaze.com"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://mapi-sandbox.unimaze.com",
      "description": "SANDBOX"
    },
    {
      "url": "https://mapi-dsp-uat.unimaze.com",
      "description": "UAT"
    },
    {
      "url": "https://mapi-partner-qa.unimaze.com",
      "description": "QA"
    }
  ],
  "paths": {
    "/api/v1/messages/create-edi-message": {
      "post": {
        "tags": [
          "Message"
        ],
        "summary": "Send an EDI document",
        "description": "Uploads EDIFACT EDI document, or a SKOT flat file document and creates a message.",
        "operationId": "CreateEdiMessage",
        "parameters": [
          {
            "name": "messageId",
            "in": "query",
            "description": "The identifier of the message in the format of a valid Universally unique identifier (GUID).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "isSkotSyntax",
            "in": "query",
            "description": "True or empty if the document is a SKOT flat file. False if the document is in EDIFACT format. T",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Message information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageOutput"
                },
                "example": {
                  "uniqueId": "f5b73b17-63b4-485e-8da2-55aa5b720d8a",
                  "timeReceived": "2026-11-13T13:09:04Z",
                  "documentNo": "INV19093078",
                  "status": "delivered",
                  "transfer": "outbound",
                  "validationStatus": "approved",
                  "service": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0##PEPPOL-3.0-ENUBL",
                  "action": "SubmitInvoice",
                  "conversation": "261113:749235:KT:1111118899",
                  "referenceInformation": "72980 ISK",
                  "originParty": {
                    "identifier": "0196:1111118899",
                    "name": "Supplier Company",
                    "countryCode": "IS"
                  },
                  "destinationParty": {
                    "identifier": "0196:2222228899",
                    "name": "Customer Company",
                    "countryCode": "IS"
                  },
                  "documents": [
                    {
                      "index": 0,
                      "name": "Invoice",
                      "contentType": "text/xml",
                      "encoding": "utf-8",
                      "referenceId": "f5b73b1763b4485e8da255aa5b720d8a:KT:1111118899:0:ae47dbywk",
                      "namespace": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2",
                      "attachmentType": "Core",
                      "isTransformed": false,
                      "transaction": {
                        "transactionKeyName": "BISENUBL-3.0 SubmitInvoice",
                        "profileIdentifier": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",
                        "customizationIdentifier": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0",
                        "documentIdentifier": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1"
                      }
                    },
                    {
                      "index": 1,
                      "name": "Timesheet",
                      "contentType": "application/pdf",
                      "encoding": "",
                      "referenceId": "f5b73b1763b4485e8da255aa5b720d8a:KT:1111118899:1:kuh4nbge",
                      "namespace": "",
                      "attachmentType": "Attached",
                      "isTransformed": false
                    }
                  ]
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/MessageOutput"
                },
                "example": "<MessageOutput xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n  <UniqueId>f5b73b17-63b4-485e-8da2-55aa5b720d8a</UniqueId>\r\n  <TimeReceived>2026-11-13T13:09:04.3362024Z</TimeReceived>\r\n  <TimeDelivered xsi:nil=\"true\" />\r\n  <DocumentNo>INV19093078</DocumentNo>\r\n  <Status>delivered</Status>\r\n  <Transfer>outbound</Transfer>\r\n  <ValidationStatus>approved</ValidationStatus>\r\n  <Service>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0##PEPPOL-3.0-ENUBL</Service>\r\n  <Action>SubmitInvoice</Action>\r\n  <Conversation>261113:749235:KT:1111118899</Conversation>\r\n  <ReferenceInformation>72980 ISK</ReferenceInformation>\r\n  <OriginParty>\r\n    <Identifier>0196:1111118899</Identifier>\r\n    <Name>Supplier Company</Name>\r\n    <CountryCode>IS</CountryCode>\r\n  </OriginParty>\r\n  <DestinationParty>\r\n    <Identifier>0196:2222228899</Identifier>\r\n    <Name>Customer Company</Name>\r\n    <CountryCode>IS</CountryCode>\r\n  </DestinationParty>\r\n  <Documents>\r\n    <MessageAttachment>\r\n      <Index>0</Index>\r\n      <Name>Invoice</Name>\r\n      <ContentType>text/xml</ContentType>\r\n      <Encoding>utf-8</Encoding>\r\n      <ReferenceId>f5b73b1763b4485e8da255aa5b720d8a:KT:1111118899:0:ae47dbywk</ReferenceId>\r\n      <Namespace>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</Namespace>\r\n      <AttachmentType>Core</AttachmentType>\r\n      <IsTransformed>false</IsTransformed>\r\n      <Transaction>\r\n        <TransactionKeyName>BISENUBL-3.0 SubmitInvoice</TransactionKeyName>\r\n        <ProfileIdentifier>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</ProfileIdentifier>\r\n        <CustomizationIdentifier>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</CustomizationIdentifier>\r\n        <DocumentIdentifier>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1</DocumentIdentifier>\r\n      </Transaction>\r\n    </MessageAttachment>\r\n    <MessageAttachment>\r\n      <Index>1</Index>\r\n      <Name>Timesheet</Name>\r\n      <ContentType>application/pdf</ContentType>\r\n      <Encoding />\r\n      <ReferenceId>f5b73b1763b4485e8da255aa5b720d8a:KT:1111118899:1:kuh4nbge</ReferenceId>\r\n      <Namespace />\r\n      <AttachmentType>Attached</AttachmentType>\r\n      <IsTransformed>false</IsTransformed>\r\n    </MessageAttachment>\r\n  </Documents>\r\n</MessageOutput>"
              }
            }
          },
          "400": {
            "description": "Invalid input parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but could not be processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleHttpErrorResult"
                },
                "example": {
                  "statusCode": "422",
                  "statusText": "UnprocessableEntity",
                  "message": "Message could not be processed. Missing lines."
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleHttpErrorResult"
                },
                "example": "<SimpleHttpErrorResult xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n  <StatusCode>422</StatusCode>\r\n  <StatusText>UnprocessableEntity</StatusText>\r\n  <Message>Message could not be processed. Missing lines.</Message>\r\n</SimpleHttpErrorResult>"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AttachmentTypeEnumOutput": {
        "enum": [
          "Core",
          "Embedded",
          "Attached",
          "External",
          "Original",
          "Supplementary",
          "Unknown"
        ],
        "type": "string",
        "description": "Enumeration for attachment types."
      },
      "MessageAttachment": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "description": "The index number of the document.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The name of the document.",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "description": "The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) (MIME type) of the document.",
            "nullable": true
          },
          "encoding": {
            "type": "string",
            "description": "The encoding used in the document, if applicable.",
            "nullable": true
          },
          "referenceId": {
            "type": "string",
            "description": "The document reference identifier.\r\nUsed for viewing the document.",
            "nullable": true
          },
          "namespace": {
            "type": "string",
            "description": "The namespace of the document.\r\nUsed in XML documents.",
            "nullable": true
          },
          "attachmentType": {
            "$ref": "#/components/schemas/AttachmentTypeEnumOutput"
          },
          "isTransformed": {
            "type": "boolean",
            "description": "The value is `true` if the document has been transformed to another document specification."
          },
          "transaction": {
            "$ref": "#/components/schemas/TransactionInfoOutput"
          }
        },
        "additionalProperties": false
      },
      "MessageOutput": {
        "type": "object",
        "properties": {
          "uniqueId": {
            "type": "string",
            "description": "The unique identifier of the message (GUID).",
            "format": "uuid"
          },
          "timeReceived": {
            "type": "string",
            "description": "The date and time when the message was received by the server.",
            "format": "date-time",
            "nullable": true
          },
          "timeDelivered": {
            "type": "string",
            "description": "The date and time when the message was delivered.",
            "format": "date-time",
            "nullable": true
          },
          "documentNo": {
            "type": "string",
            "description": "The identifying number of the document.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The message status.\r\nIndicates the current state that the message is in.\r\n            \r\nFor more information, see [Message flow](/docs/message-flow).",
            "nullable": true
          },
          "transfer": {
            "type": "string",
            "description": "The transfer status of the message.",
            "nullable": true
          },
          "validationStatus": {
            "type": "string",
            "description": "The validation status of the core document.\r\nPossible values are: `approved`, `rejected`, `ignored`, `unknown`.",
            "nullable": true
          },
          "taxReportingStatus": {
            "type": "string",
            "description": "Whether and how the message was reported to a tax authority.\r\nPossible values are: `none` (not reported), `electronic`, `nonelectronic`, `failed`.",
            "nullable": true
          },
          "lifecycleStatus": {
            "type": "string",
            "description": "The lifecycle status: the latest lifecycle event reported on the referenced invoice (for example rejected or paid).\r\nPossible values are: `none` (no lifecycle event), `rejected`, `accepted`, `paid`, `annulled`.",
            "nullable": true
          },
          "importStatus": {
            "type": "string",
            "description": "The import status: whether the message waits in the import queue of the participant.\r\nPossible values are: `notset`, `pending`, `imported`.",
            "nullable": true
          },
          "service": {
            "type": "string",
            "description": "The identifier of the business profile according to which the documents have been exchanged.\r\nGiven in the format of the Unique Resource Name (URN) of the profile, typically together with the business transaction group to which it belongs, for example, `urn:www.cenbii.eu:profile:bii04:ver1.0##CENBII-1.0`.",
            "nullable": true
          },
          "action": {
            "type": "string",
            "description": "The [business transaction group](/docs/business-transaction-groups) in the context of which the message is exchanged.",
            "nullable": true
          },
          "conversation": {
            "type": "string",
            "description": "The conversation identifier.\r\nLets you link messages that wrap related documents.",
            "nullable": true
          },
          "referenceInformation": {
            "type": "string",
            "description": "Any additional information relevant for the document, for example, the total amount indicated in the document or another reference value.",
            "nullable": true
          },
          "originParty": {
            "$ref": "#/components/schemas/MessageParty"
          },
          "destinationParty": {
            "$ref": "#/components/schemas/MessageParty"
          },
          "transaction": {
            "$ref": "#/components/schemas/TransactionInfoOutput"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageAttachment"
            },
            "description": "A list of documents that the message wraps.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Message information."
      },
      "MessageParty": {
        "type": "object",
        "properties": {
          "identifier": {
            "type": "string",
            "description": "The ISO identifier of the business participant in the `{identifierType}:{identifier}` format.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The name of the business participant.",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code of the participant (uppercase), or null when unknown. Drives the message-list flag.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Business participant information."
      },
      "SimpleHttpErrorResult": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "string",
            "nullable": true
          },
          "statusText": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransactionInfoOutput": {
        "type": "object",
        "properties": {
          "transactionKeyName": {
            "type": "string",
            "description": "The Unimaze name of the transaction.",
            "nullable": true,
            "example": "BISENUBL-3.0 SubmitInvoice"
          },
          "profileIdentifier": {
            "type": "string",
            "description": "The profile (process) identifier, for example `cbc:ProfileID` in a UBL document.",
            "nullable": true,
            "example": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"
          },
          "customizationIdentifier": {
            "type": "string",
            "description": "The customization identifier, for example `cbc:CustomizationID` in a UBL document.",
            "nullable": true,
            "example": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0"
          },
          "documentIdentifier": {
            "type": "string",
            "description": "The document type identifier: the root element namespace and name, the customization identifier and the syntax version.",
            "nullable": true,
            "example": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1"
          }
        },
        "additionalProperties": false
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": {}
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "The Messaging API supports **Bearer authentication** as defined in\r\n[RFC 6750](https://datatracker.ietf.org/doc/html/rfc6750).\r\n\r\nTo authenticate requests, include an API token in the `Authorization` header:\r\n\r\n`Authorization: Bearer {token}`\r\n\r\nThe token is an opaque value (Base64-encoded GUID) and must be treated as a\r\ncredential. Anyone in possession of the token is granted access.",
        "scheme": "bearer",
        "bearerFormat": "Opaque"
      },
      "Basic": {
        "type": "http",
        "description": "⚠ **Legacy authentication method**\r\n\r\nThe Messaging API historically supported **HTTP Basic Authentication** as defined in\r\n[RFC 7617](https://datatracker.ietf.org/doc/html/rfc7617).\r\n\r\nTo authenticate requests, include a username and password encoded using\r\nBase64 in the `Authorization` header.\r\n\r\nThis method is retained for backward compatibility only and **must not be used\r\nfor new integrations**. New consumers should use **Bearer authentication** instead.",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    },
    {
      "Basic": []
    }
  ]
}
```