POST api/DocumentsAggregation

Request Information

URI Parameters

None.

Body Parameters

DocumentAggregation
NameDescriptionTypeAdditional information
sourceDocumentId

integer

Required

sourceType

integer

Required

targetType

integer

Required

targetDocumentId

integer

None.

targetDocumentFullNumber

string

None.

targetDocumentStatus

integer

Range: inclusive between 0 and 1

targetWarehouseId

integer

None.

companyData

CompanyData

None.

elements

Collection of DocumentAggregationElement

None.

targetDocumentSymbol

string

String length: inclusive between 0 and 5

targetDocumentSeries

string

String length: inclusive between 0 and 5

targetDocumentNumber

integer

None.

createRelatedDocument

boolean

None.

description

string

String length: inclusive between 0 and 1024

targetDocumentAmount

decimal number

None.

targetDocumentSaleDate

date

None.

targetDocumentIssueDate

date

None.

targetDocumentReservationDate

date

None.

targetDocumentReceptionDate

date

None.

targetDocumentReceiptDate

date

None.

targetDocumentDeliveryDate

date

None.

targetDocumentPurchaseDate

date

None.

targetDocumentReleaseDate

date

None.

Request Formats

application/json, text/json

Sample:
{
  "sourceDocumentId": 1,
  "sourceType": 2,
  "targetType": 3,
  "targetDocumentId": 4,
  "targetDocumentFullNumber": "sample string 5",
  "targetDocumentStatus": 6,
  "targetWarehouseId": 7,
  "companyData": {
    "companyName": "sample string 1",
    "databaseName": "sample string 2"
  },
  "elements": [
    {
      "sourceElementId": 1,
      "quantity": 1.0,
      "attributes": [
        {
          "id": 1,
          "attributeId": 2,
          "objectId": 3,
          "code": "sample string 4",
          "value": "sample string 5",
          "copyToTransaction": 6,
          "copyToDelivery": 7,
          "companyData": {
            "companyName": "sample string 1",
            "databaseName": "sample string 2"
          }
        },
        {
          "id": 1,
          "attributeId": 2,
          "objectId": 3,
          "code": "sample string 4",
          "value": "sample string 5",
          "copyToTransaction": 6,
          "copyToDelivery": 7,
          "companyData": {
            "companyName": "sample string 1",
            "databaseName": "sample string 2"
          }
        }
      ],
      "unitPrice": 2.0
    },
    {
      "sourceElementId": 1,
      "quantity": 1.0,
      "attributes": [
        {
          "id": 1,
          "attributeId": 2,
          "objectId": 3,
          "code": "sample string 4",
          "value": "sample string 5",
          "copyToTransaction": 6,
          "copyToDelivery": 7,
          "companyData": {
            "companyName": "sample string 1",
            "databaseName": "sample string 2"
          }
        },
        {
          "id": 1,
          "attributeId": 2,
          "objectId": 3,
          "code": "sample string 4",
          "value": "sample string 5",
          "copyToTransaction": 6,
          "copyToDelivery": 7,
          "companyData": {
            "companyName": "sample string 1",
            "databaseName": "sample string 2"
          }
        }
      ],
      "unitPrice": 2.0
    }
  ],
  "targetDocumentSymbol": "sample string 8",
  "targetDocumentSeries": "sample string 9",
  "targetDocumentNumber": 1,
  "createRelatedDocument": true,
  "description": "sample string 11",
  "targetDocumentAmount": 1.0,
  "targetDocumentSaleDate": "2025-11-08T13:42:25.1055847+01:00",
  "targetDocumentIssueDate": "2025-11-08T13:42:25.1055847+01:00",
  "targetDocumentReservationDate": "2025-11-08T13:42:25.1055847+01:00",
  "targetDocumentReceptionDate": "2025-11-08T13:42:25.1055847+01:00",
  "targetDocumentReceiptDate": "2025-11-08T13:42:25.1055847+01:00",
  "targetDocumentDeliveryDate": "2025-11-08T13:42:25.1055847+01:00",
  "targetDocumentPurchaseDate": "2025-11-08T13:42:25.1055847+01:00",
  "targetDocumentReleaseDate": "2025-11-08T13:42:25.1055847+01:00"
}

application/xml, text/xml

Sample:
<DocumentAggregation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApiOptima_v._2._0.Models">
  <companyData>
    <companyName>sample string 1</companyName>
    <databaseName>sample string 2</databaseName>
  </companyData>
  <createRelatedDocument>true</createRelatedDocument>
  <description>sample string 11</description>
  <elements>
    <DocumentAggregationElement>
      <attributes>
        <Attribute>
          <attributeId>2</attributeId>
          <code>sample string 4</code>
          <companyData>
            <companyName>sample string 1</companyName>
            <databaseName>sample string 2</databaseName>
          </companyData>
          <copyToDelivery>7</copyToDelivery>
          <copyToTransaction>6</copyToTransaction>
          <id>1</id>
          <objectId>3</objectId>
          <value>sample string 5</value>
        </Attribute>
        <Attribute>
          <attributeId>2</attributeId>
          <code>sample string 4</code>
          <companyData>
            <companyName>sample string 1</companyName>
            <databaseName>sample string 2</databaseName>
          </companyData>
          <copyToDelivery>7</copyToDelivery>
          <copyToTransaction>6</copyToTransaction>
          <id>1</id>
          <objectId>3</objectId>
          <value>sample string 5</value>
        </Attribute>
      </attributes>
      <quantity>1</quantity>
      <sourceElementId>1</sourceElementId>
      <unitPrice>2</unitPrice>
    </DocumentAggregationElement>
    <DocumentAggregationElement>
      <attributes>
        <Attribute>
          <attributeId>2</attributeId>
          <code>sample string 4</code>
          <companyData>
            <companyName>sample string 1</companyName>
            <databaseName>sample string 2</databaseName>
          </companyData>
          <copyToDelivery>7</copyToDelivery>
          <copyToTransaction>6</copyToTransaction>
          <id>1</id>
          <objectId>3</objectId>
          <value>sample string 5</value>
        </Attribute>
        <Attribute>
          <attributeId>2</attributeId>
          <code>sample string 4</code>
          <companyData>
            <companyName>sample string 1</companyName>
            <databaseName>sample string 2</databaseName>
          </companyData>
          <copyToDelivery>7</copyToDelivery>
          <copyToTransaction>6</copyToTransaction>
          <id>1</id>
          <objectId>3</objectId>
          <value>sample string 5</value>
        </Attribute>
      </attributes>
      <quantity>1</quantity>
      <sourceElementId>1</sourceElementId>
      <unitPrice>2</unitPrice>
    </DocumentAggregationElement>
  </elements>
  <sourceDocumentId>1</sourceDocumentId>
  <sourceType>2</sourceType>
  <targetDocumentAmount>1</targetDocumentAmount>
  <targetDocumentDeliveryDate>2025-11-08T13:42:25.1055847+01:00</targetDocumentDeliveryDate>
  <targetDocumentFullNumber>sample string 5</targetDocumentFullNumber>
  <targetDocumentId>4</targetDocumentId>
  <targetDocumentIssueDate>2025-11-08T13:42:25.1055847+01:00</targetDocumentIssueDate>
  <targetDocumentNumber>1</targetDocumentNumber>
  <targetDocumentPurchaseDate>2025-11-08T13:42:25.1055847+01:00</targetDocumentPurchaseDate>
  <targetDocumentReceiptDate>2025-11-08T13:42:25.1055847+01:00</targetDocumentReceiptDate>
  <targetDocumentReceptionDate>2025-11-08T13:42:25.1055847+01:00</targetDocumentReceptionDate>
  <targetDocumentReleaseDate>2025-11-08T13:42:25.1055847+01:00</targetDocumentReleaseDate>
  <targetDocumentReservationDate>2025-11-08T13:42:25.1055847+01:00</targetDocumentReservationDate>
  <targetDocumentSaleDate>2025-11-08T13:42:25.1055847+01:00</targetDocumentSaleDate>
  <targetDocumentSeries>sample string 9</targetDocumentSeries>
  <targetDocumentStatus>6</targetDocumentStatus>
  <targetDocumentSymbol>sample string 8</targetDocumentSymbol>
  <targetType>3</targetType>
  <targetWarehouseId>7</targetWarehouseId>
</DocumentAggregation>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'DocumentAggregation'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.