NAV

<back to all web services

BusinessEntityDocumentCreate

EntityAPI|BusinessEntityDocument
The following routes are available for this service:
POST/business-entities/{BeeNumber}/documents
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Nxnw.Adc.BusinessEntity.ServiceModel
Imports Nxnw.Adc.Common.ServiceModel

Namespace Global

    Namespace Nxnw.Adc.BusinessEntity.ServiceModel

        Public Partial Class BusinessEntityDocumentCreate
            Implements IPost
            <ApiMember(IsRequired:=true)>
            Public Overridable Property BeeNumber As Nullable(Of Decimal)

            <ApiMember(IsRequired:=true)>
            Public Overridable Property DocumentCategoryId As String

            <ApiMember(IsRequired:=true)>
            Public Overridable Property DocumentName As String

            Public Overridable Property UserName As String
            <ApiMember(IsRequired:=true)>
            Public Overridable Property CreatedDate As Date

            <ApiMember>
            Public Overridable Property DocumentDefinition As String

            <ApiMember>
            Public Overridable Property OverwriteIfExists As Boolean
        End Class

        Public Partial Class BusinessEntityDocumentCreateResponse
            Inherits CreateResponse
            Public Overridable Property BeeDocumentGuid As Long
        End Class
    End Namespace

    Namespace Nxnw.Adc.Common.ServiceModel

        Public Partial Class CreateResponse
            Implements ICreateResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property Links As HateoasLinks
        End Class

        Public Partial Class HateoasLink
            Public Overridable Property Rel As String
            Public Overridable Property Href As String
            Public Overridable Property Type As String
        End Class

        Public Partial Class HateoasLinks
            Inherits List(Of HateoasLink)
        End Class
    End Namespace
End Namespace

VB.NET BusinessEntityDocumentCreate DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /business-entities/{BeeNumber}/documents HTTP/1.1 
Host: extensions.avon.ca 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"beeNumber":0,"documentCategoryId":"String","documentName":"String","userName":"String","createdDate":"0001-01-01T00:00:00.0000000","documentDefinition":"String","overwriteIfExists":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"beeDocumentGuid":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"links":[{"rel":"String","href":"String","type":"String"}]}