Billiecart API

<back to all web services

MaintainCarRequest

Requires Authentication
Requires the role:manager
The following routes are available for this service:
PUT,PATCH/cars/{Id}/maintain
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Infrastructure.Api.Interfaces.ServiceOperations.Cars
Imports Infrastructure.Api.Interfaces.ServiceOperations
Imports Application.Interfaces.Resources

Namespace Global

    Namespace Application.Interfaces.Resources

        Public Partial Class Car
            Implements IIdentifiableResource
            Public Sub New()
                Managers = New List(Of CarManager)
            End Sub

            Public Overridable Property Manufacturer As CarManufacturer
            Public Overridable Property Plate As CarLicensePlate
            Public Overridable Property Owner As CarOwner
            Public Overridable Property Managers As List(Of CarManager)
            Public Overridable Property Status As String
            Public Overridable Property Altered As Nullable(Of Boolean)
            Public Overridable Property Id As String
        End Class

        Public Partial Class CarLicensePlate
            Public Overridable Property Jurisdiction As String
            Public Overridable Property Number As String
        End Class

        Public Partial Class CarManager
            Public Overridable Property Id As String
        End Class

        Public Partial Class CarManufacturer
            Public Overridable Property Year As Integer
            Public Overridable Property Make As String
            Public Overridable Property Model As String
        End Class

        Public Partial Class CarOwner
            Public Overridable Property Id As String
        End Class
    End Namespace

    Namespace Infrastructure.Api.Interfaces.ServiceOperations

        Public Partial Class PutPatchOperationTenanted(Of TResponse)
            Inherits PutPatchOperationUnTenanted(Of TResponse)
            Implements ITenantedRequest
            Public Overridable Property OrganisationId As String
        End Class

        Public Partial Class PutPatchOperationUnTenanted(Of TResponse)
            Implements IPatch
            Implements IPut
        End Class
    End Namespace

    Namespace Infrastructure.Api.Interfaces.ServiceOperations.Cars

        Public Partial Class MaintainCarRequest
            Inherits PutPatchOperationTenanted(Of MaintainCarResponse)
            Public Overridable Property Id As String
            Public Overridable Property FromUtc As Date
            Public Overridable Property ToUtc As Date
        End Class

        Public Partial Class MaintainCarResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property Car As Car
        End Class
    End Namespace
End Namespace

VB.NET MaintainCarRequest 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.

PUT /cars/{Id}/maintain HTTP/1.1 
Host: staging-api.billiecart.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String","organisationId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"car":{"manufacturer":{"year":0,"make":"String","model":"String"},"plate":{"jurisdiction":"String","number":"String"},"owner":{"id":"String"},"managers":[{"id":"String"}],"status":"String","altered":false,"id":"String"}}