POST api/CUSTOMER_CARTS?foreigns={foreigns}

Add a single cart item into current customer's cart

Request Information

URI Parameters

NameDescriptionTypeAdditional information
foreigns

Optional. Default value is false. True=> Include nested foreign objects within reply. False=> Do NOT Include nested foreign objects within reply

boolean

Default value is False

Body Parameters

Obligatory. The new CUSTOMER_CARTS object that need to be added

CART_ITEM
NameDescriptionTypeAdditional information
CART_ID

integer

None.

CART_ID_IMAGE

string

None.

TITLE_AR

string

None.

TITLE_EN

string

None.

TITLE2_AR

string

None.

TITLE2_EN

string

None.

FK_CUSTOMER

integer

None.

FK_LIVESTOCK

integer

None.

FK_PROMO

integer

None.

QUANTITY

integer

None.

FK_PACKAGING_METHOD

integer

None.

PACKAGING_CHARGE

decimal number

None.

FK_SLICING_METHOD

integer

None.

SLICING_CHARGE

decimal number

None.

UNIT_PRICE

decimal number

None.

TOTAL_PRICE

decimal number

None.

FK_CLASS

integer

None.

FK_CATEGORY

integer

None.

FK_AGE

integer

None.

FK_WEIGHT

integer

None.

AGE_NAME_AR

string

None.

AGE_NAME_EN

string

None.

WEIGHT_NAME_AR

string

None.

WEIGHT_NAME_EN

string

None.

SLICING_ID_IMAGE

globally unique identifier

None.

SLICING_NAME_AR

string

None.

SLICING_NAME_EN

string

None.

SLICING_PRICE

decimal number

None.

PACKAGING_ID_IMAGE

globally unique identifier

None.

PACKAGING_NAME_AR

string

None.

PACKAGING_NAME_EN

string

None.

PACKAGING_PRICE

decimal number

None.

NOTES

string

None.

WEIGHT

decimal number

None.

APPROVED

Default value is true. While adding a perkilo livestock to cart you need to send this field value as 0.

boolean

None.

SECONDARY_PARTS_DESC_AR

string

None.

SECONDARY_PARTS_DESC_EN

string

None.

SECONDARY_PARTS_TOTAL

decimal number

None.

SECONDARY_PARTS

Collection of CART_ITEM_SEC_PART

None.

SLICING_CUTTINGS_DESC_AR

string

None.

SLICING_CUTTINGS_DESC_EN

string

None.

SLICING_CUTTINGS_ITEMS

Collection of CART_ITEM_SLICING_CUTTING

None.

Request Formats

application/json, text/json

Sample:
{
  "CART_ID": 1,
  "CART_ID_IMAGE": "sample string 2",
  "TITLE_AR": "sample string 3",
  "TITLE_EN": "sample string 4",
  "TITLE2_AR": "sample string 5",
  "TITLE2_EN": "sample string 6",
  "FK_CUSTOMER": 7,
  "FK_LIVESTOCK": 1,
  "FK_PROMO": 1,
  "QUANTITY": 8,
  "FK_PACKAGING_METHOD": 1,
  "PACKAGING_CHARGE": 1.0,
  "FK_SLICING_METHOD": 1,
  "SLICING_CHARGE": 1.0,
  "UNIT_PRICE": 9.0,
  "TOTAL_PRICE": 10.0,
  "FK_CLASS": 1,
  "FK_CATEGORY": 1,
  "FK_AGE": 1,
  "FK_WEIGHT": 1,
  "AGE_NAME_AR": "sample string 11",
  "AGE_NAME_EN": "sample string 12",
  "WEIGHT_NAME_AR": "sample string 13",
  "WEIGHT_NAME_EN": "sample string 14",
  "SLICING_ID_IMAGE": "096d505d-6058-484c-b31b-61e1a95f90c1",
  "SLICING_NAME_AR": "sample string 15",
  "SLICING_NAME_EN": "sample string 16",
  "SLICING_PRICE": 17.0,
  "PACKAGING_ID_IMAGE": "206b9842-09df-4fa1-aa04-5e18a70dc52e",
  "PACKAGING_NAME_AR": "sample string 18",
  "PACKAGING_NAME_EN": "sample string 19",
  "PACKAGING_PRICE": 20.0,
  "NOTES": "sample string 21",
  "WEIGHT": 22.0,
  "APPROVED": true,
  "SECONDARY_PARTS_DESC_AR": "sample string 24",
  "SECONDARY_PARTS_DESC_EN": "sample string 25",
  "SECONDARY_PARTS_TOTAL": 26.0,
  "SECONDARY_PARTS": [
    {
      "PART_ID": 1,
      "PART_NAME_AR": "sample string 2",
      "PART_NAME_EN": "sample string 3",
      "PART_PRICE": 4.0
    },
    {
      "PART_ID": 1,
      "PART_NAME_AR": "sample string 2",
      "PART_NAME_EN": "sample string 3",
      "PART_PRICE": 4.0
    }
  ],
  "SLICING_CUTTINGS_DESC_AR": "sample string 27",
  "SLICING_CUTTINGS_DESC_EN": "sample string 28",
  "SLICING_CUTTINGS_ITEMS": [
    {
      "CUTTING_ID": 1,
      "CUTTING_NAME_AR": "sample string 2",
      "CUTTING_NAME_EN": "sample string 3"
    },
    {
      "CUTTING_ID": 1,
      "CUTTING_NAME_AR": "sample string 2",
      "CUTTING_NAME_EN": "sample string 3"
    }
  ]
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Returns all cart items belongs to current customer

CUSTOMER_CARTS_CMD_RESPONSE
NameDescriptionTypeAdditional information
Status

Status

None.

DATA

Collection of CART_ITEM

None.

Response Formats

application/json, text/json

Sample:
{
  "Status": {
    "Success": true,
    "MessageEn": "sample string 2",
    "MessageAr": "sample string 3",
    "DetailedMessage": "sample string 4",
    "Code": 0,
    "CartErrors": [
      {
        "ResultStatusCode": 0,
        "CartId": 1,
        "CorrectValue": {},
        "MessageEn": "sample string 2",
        "MessageAr": "sample string 3",
        "CartCorrectAction": 0
      },
      {
        "ResultStatusCode": 0,
        "CartId": 1,
        "CorrectValue": {},
        "MessageEn": "sample string 2",
        "MessageAr": "sample string 3",
        "CartCorrectAction": 0
      }
    ]
  },
  "DATA": [
    {
      "CART_ID": 1,
      "CART_ID_IMAGE": "sample string 2",
      "TITLE_AR": "sample string 3",
      "TITLE_EN": "sample string 4",
      "TITLE2_AR": "sample string 5",
      "TITLE2_EN": "sample string 6",
      "FK_CUSTOMER": 7,
      "FK_LIVESTOCK": 1,
      "FK_PROMO": 1,
      "QUANTITY": 8,
      "FK_PACKAGING_METHOD": 1,
      "PACKAGING_CHARGE": 1.0,
      "FK_SLICING_METHOD": 1,
      "SLICING_CHARGE": 1.0,
      "UNIT_PRICE": 9.0,
      "TOTAL_PRICE": 10.0,
      "FK_CLASS": 1,
      "FK_CATEGORY": 1,
      "FK_AGE": 1,
      "FK_WEIGHT": 1,
      "AGE_NAME_AR": "sample string 11",
      "AGE_NAME_EN": "sample string 12",
      "WEIGHT_NAME_AR": "sample string 13",
      "WEIGHT_NAME_EN": "sample string 14",
      "SLICING_ID_IMAGE": "37ac4921-99e0-4d3e-8b43-e40fb5e0ad9b",
      "SLICING_NAME_AR": "sample string 15",
      "SLICING_NAME_EN": "sample string 16",
      "SLICING_PRICE": 17.0,
      "PACKAGING_ID_IMAGE": "e814d21d-bc14-4566-991e-9d3b85a6f14a",
      "PACKAGING_NAME_AR": "sample string 18",
      "PACKAGING_NAME_EN": "sample string 19",
      "PACKAGING_PRICE": 20.0,
      "NOTES": "sample string 21",
      "WEIGHT": 22.0,
      "APPROVED": true,
      "SECONDARY_PARTS_DESC_AR": "sample string 24",
      "SECONDARY_PARTS_DESC_EN": "sample string 25",
      "SECONDARY_PARTS_TOTAL": 26.0,
      "SECONDARY_PARTS": [
        {
          "PART_ID": 1,
          "PART_NAME_AR": "sample string 2",
          "PART_NAME_EN": "sample string 3",
          "PART_PRICE": 4.0
        },
        {
          "PART_ID": 1,
          "PART_NAME_AR": "sample string 2",
          "PART_NAME_EN": "sample string 3",
          "PART_PRICE": 4.0
        }
      ],
      "SLICING_CUTTINGS_DESC_AR": "sample string 27",
      "SLICING_CUTTINGS_DESC_EN": "sample string 28",
      "SLICING_CUTTINGS_ITEMS": [
        {
          "CUTTING_ID": 1,
          "CUTTING_NAME_AR": "sample string 2",
          "CUTTING_NAME_EN": "sample string 3"
        },
        {
          "CUTTING_ID": 1,
          "CUTTING_NAME_AR": "sample string 2",
          "CUTTING_NAME_EN": "sample string 3"
        }
      ]
    },
    {
      "CART_ID": 1,
      "CART_ID_IMAGE": "sample string 2",
      "TITLE_AR": "sample string 3",
      "TITLE_EN": "sample string 4",
      "TITLE2_AR": "sample string 5",
      "TITLE2_EN": "sample string 6",
      "FK_CUSTOMER": 7,
      "FK_LIVESTOCK": 1,
      "FK_PROMO": 1,
      "QUANTITY": 8,
      "FK_PACKAGING_METHOD": 1,
      "PACKAGING_CHARGE": 1.0,
      "FK_SLICING_METHOD": 1,
      "SLICING_CHARGE": 1.0,
      "UNIT_PRICE": 9.0,
      "TOTAL_PRICE": 10.0,
      "FK_CLASS": 1,
      "FK_CATEGORY": 1,
      "FK_AGE": 1,
      "FK_WEIGHT": 1,
      "AGE_NAME_AR": "sample string 11",
      "AGE_NAME_EN": "sample string 12",
      "WEIGHT_NAME_AR": "sample string 13",
      "WEIGHT_NAME_EN": "sample string 14",
      "SLICING_ID_IMAGE": "37ac4921-99e0-4d3e-8b43-e40fb5e0ad9b",
      "SLICING_NAME_AR": "sample string 15",
      "SLICING_NAME_EN": "sample string 16",
      "SLICING_PRICE": 17.0,
      "PACKAGING_ID_IMAGE": "e814d21d-bc14-4566-991e-9d3b85a6f14a",
      "PACKAGING_NAME_AR": "sample string 18",
      "PACKAGING_NAME_EN": "sample string 19",
      "PACKAGING_PRICE": 20.0,
      "NOTES": "sample string 21",
      "WEIGHT": 22.0,
      "APPROVED": true,
      "SECONDARY_PARTS_DESC_AR": "sample string 24",
      "SECONDARY_PARTS_DESC_EN": "sample string 25",
      "SECONDARY_PARTS_TOTAL": 26.0,
      "SECONDARY_PARTS": [
        {
          "PART_ID": 1,
          "PART_NAME_AR": "sample string 2",
          "PART_NAME_EN": "sample string 3",
          "PART_PRICE": 4.0
        },
        {
          "PART_ID": 1,
          "PART_NAME_AR": "sample string 2",
          "PART_NAME_EN": "sample string 3",
          "PART_PRICE": 4.0
        }
      ],
      "SLICING_CUTTINGS_DESC_AR": "sample string 27",
      "SLICING_CUTTINGS_DESC_EN": "sample string 28",
      "SLICING_CUTTINGS_ITEMS": [
        {
          "CUTTING_ID": 1,
          "CUTTING_NAME_AR": "sample string 2",
          "CUTTING_NAME_EN": "sample string 3"
        },
        {
          "CUTTING_ID": 1,
          "CUTTING_NAME_AR": "sample string 2",
          "CUTTING_NAME_EN": "sample string 3"
        }
      ]
    }
  ]
}