POST api/V3/Schemes/AddSchemeBasket

API to add scheme baskets

Request Information

URI Parameters

None.

Body Parameters

List of scheme baskets to be added(Max 100)

Collection of V3.SchemeBasket
NameDescriptionTypeAdditional information
BasketName

Name of the Basket

string

Required

String length: inclusive between 1 and 100

BasketERPid

ERP ID of the Basket

string

Required

String length: inclusive between 1 and 100

EntityValues

Entity Values

Collection of EntityValueObj

Required

Request Formats

application/json, text/json

Sample:
[
  {
    "BasketName": "sample string 1",
    "BasketERPid": "sample string 2",
    "EntityValues": [
      {
        "EntityType": "ProductDivision",
        "EntityErpId": "sample string 1",
        "Quantity": 1.1,
        "Batch": "sample string 2",
        "IsMustSell": true
      },
      {
        "EntityType": "ProductDivision",
        "EntityErpId": "sample string 1",
        "Quantity": 1.1,
        "Batch": "sample string 2",
        "IsMustSell": true
      }
    ]
  },
  {
    "BasketName": "sample string 1",
    "BasketERPid": "sample string 2",
    "EntityValues": [
      {
        "EntityType": "ProductDivision",
        "EntityErpId": "sample string 1",
        "Quantity": 1.1,
        "Batch": "sample string 2",
        "IsMustSell": true
      },
      {
        "EntityType": "ProductDivision",
        "EntityErpId": "sample string 1",
        "Quantity": 1.1,
        "Batch": "sample string 2",
        "IsMustSell": true
      }
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfSchemeBasket xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExternalApis.V3.Models">
  <SchemeBasket>
    <BasketERPid>sample string 2</BasketERPid>
    <BasketName>sample string 1</BasketName>
    <EntityValues>
      <EntityValueObj>
        <Batch>sample string 2</Batch>
        <EntityErpId>sample string 1</EntityErpId>
        <EntityType>ProductDivision</EntityType>
        <IsMustSell>true</IsMustSell>
        <Quantity>1.1</Quantity>
      </EntityValueObj>
      <EntityValueObj>
        <Batch>sample string 2</Batch>
        <EntityErpId>sample string 1</EntityErpId>
        <EntityType>ProductDivision</EntityType>
        <IsMustSell>true</IsMustSell>
        <Quantity>1.1</Quantity>
      </EntityValueObj>
    </EntityValues>
  </SchemeBasket>
  <SchemeBasket>
    <BasketERPid>sample string 2</BasketERPid>
    <BasketName>sample string 1</BasketName>
    <EntityValues>
      <EntityValueObj>
        <Batch>sample string 2</Batch>
        <EntityErpId>sample string 1</EntityErpId>
        <EntityType>ProductDivision</EntityType>
        <IsMustSell>true</IsMustSell>
        <Quantity>1.1</Quantity>
      </EntityValueObj>
      <EntityValueObj>
        <Batch>sample string 2</Batch>
        <EntityErpId>sample string 1</EntityErpId>
        <EntityType>ProductDivision</EntityType>
        <IsMustSell>true</IsMustSell>
        <Quantity>1.1</Quantity>
      </EntityValueObj>
    </EntityValues>
  </SchemeBasket>
</ArrayOfSchemeBasket>

Response Information

Resource Description

Response Description with Error messages

ApiResponse
NameDescriptionTypeAdditional information
Message

Message Indicating the Overall Response Summary of the Requested API

string

None.

ResponseList

List of Errors

Collection of ApiResponseMessage

None.

Response

Enum Indicating the Response status

ResponseStatus

None.

ResponseStatusCount

Summary containing Number of SuccessFull And Failed Tasks

ResponseStatusCount

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "ResponseList": [
    {
      "ERPId": "sample string 1",
      "Message": "sample string 2",
      "ResponseStatus": "Failure",
      "GUID": "sample string 3"
    },
    {
      "ERPId": "sample string 1",
      "Message": "sample string 2",
      "ResponseStatus": "Failure",
      "GUID": "sample string 3"
    }
  ],
  "Response": "Failure",
  "ResponseStatusCount": {
    "Updated": 1,
    "Failed": 2,
    "Ignored": 3,
    "Name": "sample string 1",
    "Total": 6,
    "StatusMessage": "sample string 1: Total-6, Updated-1, Failed-2, Ignored-3",
    "ResponseStatus": "PartialSuccess"
  }
}

application/xml, text/xml

Sample:
<ApiResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExternalApis.Models.Common">
  <Message>sample string 1</Message>
  <Response>Failure</Response>
  <ResponseList>
    <ApiResponseMessage>
      <ERPId>sample string 1</ERPId>
      <GUID>sample string 3</GUID>
      <Message>sample string 2</Message>
      <ResponseStatus>Failure</ResponseStatus>
    </ApiResponseMessage>
    <ApiResponseMessage>
      <ERPId>sample string 1</ERPId>
      <GUID>sample string 3</GUID>
      <Message>sample string 2</Message>
      <ResponseStatus>Failure</ResponseStatus>
    </ApiResponseMessage>
  </ResponseList>
  <ResponseStatusCount>
    <Failed>2</Failed>
    <Ignored>3</Ignored>
    <Name>sample string 1</Name>
    <Updated>1</Updated>
  </ResponseStatusCount>
</ApiResponse>