Mercedes.Agency.Orchestration.API

<back to all web services

ValidateBackOrderBulkStatusAllocationsRequest

BackOrder
Requires Authentication
The following routes are available for this service:
POST/v1/BackOrder/ValidateBulkStatusAllocationsValidates back order references and statuses provided in a csv file for allocation to active back orders.Reads a csv file and parses a list of back order references, MBUK assistance statuses and messages for validation before allocation to active back orders.
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ValidateBackOrderBulkStatusAllocationsRequest
    {
        
    }

    public static class BackOrderBulkStatusAllocationsResponse
    {
        public String Message = null;
        public BackOrderBulkStatusAllocation BackOrders = null;
        public Boolean Successful = null;
        public String Filename = null;
        
        public String getMessage() { return Message; }
        public BackOrderBulkStatusAllocationsResponse setMessage(String value) { this.Message = value; return this; }
        public BackOrderBulkStatusAllocation getBackOrders() { return BackOrders; }
        public BackOrderBulkStatusAllocationsResponse setBackOrders(BackOrderBulkStatusAllocation value) { this.BackOrders = value; return this; }
        public Boolean isSuccessful() { return Successful; }
        public BackOrderBulkStatusAllocationsResponse setSuccessful(Boolean value) { this.Successful = value; return this; }
        public String getFilename() { return Filename; }
        public BackOrderBulkStatusAllocationsResponse setFilename(String value) { this.Filename = value; return this; }
    }

    public static class BackOrderBulkStatusAllocation
    {
        public Integer TotalBackOrders = null;
        public Integer ValidBackOrders = null;
        public Integer InvalidBackOrders = null;
        public ArrayList<BackOrderStatusAllocation> Valid = new ArrayList<BackOrderStatusAllocation>();
        public ArrayList<InvalidBackOrderStatusAllocation> Invalid = new ArrayList<InvalidBackOrderStatusAllocation>();
        
        public Integer getTotalBackOrders() { return TotalBackOrders; }
        public BackOrderBulkStatusAllocation setTotalBackOrders(Integer value) { this.TotalBackOrders = value; return this; }
        public Integer getValidBackOrders() { return ValidBackOrders; }
        public BackOrderBulkStatusAllocation setValidBackOrders(Integer value) { this.ValidBackOrders = value; return this; }
        public Integer getInvalidBackOrders() { return InvalidBackOrders; }
        public BackOrderBulkStatusAllocation setInvalidBackOrders(Integer value) { this.InvalidBackOrders = value; return this; }
        public ArrayList<BackOrderStatusAllocation> getValid() { return Valid; }
        public BackOrderBulkStatusAllocation setValid(ArrayList<BackOrderStatusAllocation> value) { this.Valid = value; return this; }
        public ArrayList<InvalidBackOrderStatusAllocation> getInvalid() { return Invalid; }
        public BackOrderBulkStatusAllocation setInvalid(ArrayList<InvalidBackOrderStatusAllocation> value) { this.Invalid = value; return this; }
    }

    public static class BackOrderStatusAllocation
    {
        public Integer Row = null;
        public String BackOrderReference = null;
        public String Status = null;
        public String Message = null;
        
        public Integer getRow() { return Row; }
        public BackOrderStatusAllocation setRow(Integer value) { this.Row = value; return this; }
        public String getBackOrderReference() { return BackOrderReference; }
        public BackOrderStatusAllocation setBackOrderReference(String value) { this.BackOrderReference = value; return this; }
        public String getStatus() { return Status; }
        public BackOrderStatusAllocation setStatus(String value) { this.Status = value; return this; }
        public String getMessage() { return Message; }
        public BackOrderStatusAllocation setMessage(String value) { this.Message = value; return this; }
    }

    public static class InvalidBackOrderStatusAllocation extends BackOrderStatusAllocation
    {
        public String ValidationMessage = null;
        
        public String getValidationMessage() { return ValidationMessage; }
        public InvalidBackOrderStatusAllocation setValidationMessage(String value) { this.ValidationMessage = value; return this; }
    }

}

Java ValidateBackOrderBulkStatusAllocationsRequest 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 /v1/BackOrder/ValidateBulkStatusAllocations HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Message":"One or more errors in file","BackOrders":{"TotalBackOrders":2,"ValidBackOrders":1,"InvalidBackOrders":1,"Valid":[{"Row":0,"BackOrderReference":"String","Status":"String","Message":"String"}],"Invalid":[{"ValidationMessage":"String","Row":0,"BackOrderReference":"String","Status":"String","Message":"String"}]},"Successful":false,"Filename":"String"}