Mercedes.Agency.Orchestration.API

<back to all web services

UpdateVehicleSwapRequest

VehicleSwap
Requires Authentication
The following routes are available for this service:
PUT/v1/VehicleSwapUpdates vehicle swap, order and back order recordsThis endpoint validates a swap vehicle and then calls an endpoint in the Agency API to update vehicle swap, order and back order and sends a message to OneAgent with the updated order vehicle and offers
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Mercedes.Agency.Orchestration.API.ServiceModel.VehicleSwap
Imports Mercedes.Agency.API.Shared.POCO

Namespace Global

    Namespace Mercedes.Agency.API.Shared.POCO

        Public Partial Class UpdateVehicleSwapResponse
            Public Overridable Property Errors As List(Of VehicleError)
        End Class

        Public Partial Class VehicleError
            Public Overridable Property Field As String
            Public Overridable Property Message As String
        End Class
    End Namespace

    Namespace Mercedes.Agency.Orchestration.API.ServiceModel.VehicleSwap

        Public Partial Class UpdateVehicleSwapRequest
            Implements IPost
            Public Overridable Property VehicleSwapGuid As Guid
            Public Overridable Property OrderGuid As Guid
            Public Overridable Property BackOrderGuid As Guid?
            Public Overridable Property GssnId As String
            Public Overridable Property Agent As String
            Public Overridable Property ExistingVin As String
            Public Overridable Property SwapVin As String
            Public Overridable Property PersonalisedItemOfferIds As Integer()
        End Class
    End Namespace
End Namespace

VB.NET UpdateVehicleSwapRequest DTOs

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

HTTP + XML

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

PUT /v1/VehicleSwap HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateVehicleSwapRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.ServiceModel.VehicleSwap">
  <Agent>String</Agent>
  <BackOrderGuid>00000000-0000-0000-0000-000000000000</BackOrderGuid>
  <ExistingVin>String</ExistingVin>
  <GssnId>String</GssnId>
  <OrderGuid>00000000-0000-0000-0000-000000000000</OrderGuid>
  <PersonalisedItemOfferIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </PersonalisedItemOfferIds>
  <SwapVin>String</SwapVin>
  <VehicleSwapGuid>00000000-0000-0000-0000-000000000000</VehicleSwapGuid>
</UpdateVehicleSwapRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UpdateVehicleSwapResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO">
  <Errors>
    <VehicleError>
      <Field>String</Field>
      <Message>String</Message>
    </VehicleError>
  </Errors>
</UpdateVehicleSwapResponse>