POST api/invoice/sales/create

Request Information

URI Parameters

None.

Body Parameters

CreateSalesInvoiceDataContract
NameDescriptionTypeAdditional information
LiableAccountId

integer

None.

RecipientAccountId

integer

None.

Date

date

None.

Description

string

None.

InvoiceItems

Collection of InvoiceItemDataContract

None.

Notes

string

None.

Type

InvoiceType

None.

InvoiceSubType

InvoiceSubType

None.

RelatedInvoiceId

integer

None.

RelatedEntities

Collection of RelatedEntityDataContract

None.

IsDraft

boolean

None.

Id

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "LiableAccountId": 1,
  "RecipientAccountId": 2,
  "Date": "2018-11-16T19:57:39.6010325Z",
  "Description": "sample string 4",
  "InvoiceItems": [
    {
      "Amount": 1.0,
      "Name": "sample string 2",
      "IsTaxable": true,
      "TaxId": 1,
      "Discount": 4.0,
      "DiscountName": "sample string 5",
      "DiscountDate": "2018-11-16T19:57:39.6010325Z",
      "Type": 0,
      "RelatedEntityId": 6,
      "CreditNoteItems": [
        {
          "Amount": 1.0,
          "InvoiceItemId": 2,
          "CreditNoteId": 3,
          "Id": 4
        },
        {
          "Amount": 1.0,
          "InvoiceItemId": 2,
          "CreditNoteId": 3,
          "Id": 4
        }
      ],
      "Id": 7
    },
    {
      "Amount": 1.0,
      "Name": "sample string 2",
      "IsTaxable": true,
      "TaxId": 1,
      "Discount": 4.0,
      "DiscountName": "sample string 5",
      "DiscountDate": "2018-11-16T19:57:39.6010325Z",
      "Type": 0,
      "RelatedEntityId": 6,
      "CreditNoteItems": [
        {
          "Amount": 1.0,
          "InvoiceItemId": 2,
          "CreditNoteId": 3,
          "Id": 4
        },
        {
          "Amount": 1.0,
          "InvoiceItemId": 2,
          "CreditNoteId": 3,
          "Id": 4
        }
      ],
      "Id": 7
    }
  ],
  "Notes": "sample string 5",
  "Type": 0,
  "InvoiceSubType": 0,
  "RelatedInvoiceId": 1,
  "RelatedEntities": [
    {
      "Name": "sample string 1",
      "Type": "sample string 2",
      "Description": "sample string 3"
    },
    {
      "Name": "sample string 1",
      "Type": "sample string 2",
      "Description": "sample string 3"
    }
  ],
  "IsDraft": true,
  "Id": 7
}

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 'CreateSalesInvoiceDataContract'.

Response Information

Resource Description

InvoiceDataContract
NameDescriptionTypeAdditional information
RecipientAccountId

integer

None.

LiableAccountId

integer

None.

RecipientAccountName

string

None.

RecipientGroupId

integer

None.

LiableAccountName

string

None.

LiableAccountBalance

decimal number

None.

LiableGroupId

decimal number

None.

Status

string

None.

DueDate

date

None.

CreatedDate

date

None.

InvoiceNumber

integer

None.

Description

string

None.

InvoiceType

string

None.

InvoiceSubType

string

None.

TotalAmount

decimal number

None.

SubTotalAmount

decimal number

None.

TaxTotalAmount

decimal number

None.

DiscountTotalAmount

decimal number

None.

TotalOutstanding

decimal number

None.

TotalPaid

decimal number

None.

Payments

Collection of InvoicePaymentDataContract

None.

Allocations

Collection of InvoiceAllocationCollectionDataContract

None.

InvoiceItems

Collection of InvoiceItemDetailDataContract

None.

LinkedFees

Collection of LinkedFeeDataContract

None.

RelatedInvoiceId

integer

None.

Id

integer

None.

Response Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Self referencing loop detected for property 'Invoice' with type 'Dezrez.Core.DataContracts.Accounts.Invoices.Query.InvoiceDataContract'. Path 'Allocations[0].Allocations[0]'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Self referencing loop detected for property 'Invoice' with type 'Dezrez.Core.DataContracts.Accounts.Invoices.Query.InvoiceDataContract'. Path 'Allocations[0].Allocations[0]'.