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
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class UpdateVehicleSwapRequest implements IPost
    {
        public UUID VehicleSwapGuid = null;
        public UUID OrderGuid = null;
        public UUID BackOrderGuid = null;
        public String GssnId = null;
        public String Agent = null;
        public String ExistingVin = null;
        public String SwapVin = null;
        public ArrayList<Integer> PersonalisedItemOfferIds = null;
        
        public UUID getVehicleSwapGuid() { return VehicleSwapGuid; }
        public UpdateVehicleSwapRequest setVehicleSwapGuid(UUID value) { this.VehicleSwapGuid = value; return this; }
        public UUID getOrderGuid() { return OrderGuid; }
        public UpdateVehicleSwapRequest setOrderGuid(UUID value) { this.OrderGuid = value; return this; }
        public UUID getBackOrderGuid() { return BackOrderGuid; }
        public UpdateVehicleSwapRequest setBackOrderGuid(UUID value) { this.BackOrderGuid = value; return this; }
        public String getGssnId() { return GssnId; }
        public UpdateVehicleSwapRequest setGssnId(String value) { this.GssnId = value; return this; }
        public String getAgent() { return Agent; }
        public UpdateVehicleSwapRequest setAgent(String value) { this.Agent = value; return this; }
        public String getExistingVin() { return ExistingVin; }
        public UpdateVehicleSwapRequest setExistingVin(String value) { this.ExistingVin = value; return this; }
        public String getSwapVin() { return SwapVin; }
        public UpdateVehicleSwapRequest setSwapVin(String value) { this.SwapVin = value; return this; }
        public ArrayList<Integer> getPersonalisedItemOfferIds() { return PersonalisedItemOfferIds; }
        public UpdateVehicleSwapRequest setPersonalisedItemOfferIds(ArrayList<Integer> value) { this.PersonalisedItemOfferIds = value; return this; }
    }

    public static class UpdateVehicleSwapResponse
    {
        public ArrayList<VehicleError> Errors = null;
        
        public ArrayList<VehicleError> getErrors() { return Errors; }
        public UpdateVehicleSwapResponse setErrors(ArrayList<VehicleError> value) { this.Errors = value; return this; }
    }

    public static class VehicleError
    {
        public String Field = null;
        public String Message = null;
        
        public String getField() { return Field; }
        public VehicleError setField(String value) { this.Field = value; return this; }
        public String getMessage() { return Message; }
        public VehicleError setMessage(String value) { this.Message = value; return this; }
    }

}

Java UpdateVehicleSwapRequest DTOs

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

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	VehicleSwapGuid: 00000000000000000000000000000000,
	OrderGuid: 00000000000000000000000000000000,
	BackOrderGuid: 00000000000000000000000000000000,
	GssnId: String,
	Agent: String,
	ExistingVin: String,
	SwapVin: String,
	PersonalisedItemOfferIds: 
	[
		0
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Errors: 
	[
		{
			Field: String,
			Message: String
		}
	]
}