Skip to content

Payload branch "attributes"

The first "branch" of the payload is made of those informations that are relative to the order confirmation/purchase only, and for some reason they cannot be easily grouped into other "scoped branch".

Let's review an example:

js
{  
  "attributes": {
    "id": 146,
    "reference": "BSO00298",
    "cart_id": 298,
    "lang_id": "it",
    "availability_mode": "master",    
    "currency": {
      "id": 1,
      "name": "Euro",
      "iso_code": "EUR"
    },
    "total": "34.96",
    "total_discount": "10.00",
    "total_taxes": "6.30",
    "total_products": "84.96",
    "total_shipment": "0.00",
    "total_payment": "0.00"
  },
  "products": [...],
  "carrier": {...},
  "payment": {...},
  "delivery": {...},
  "billing": {...},
  "user": {...},
  "engagements": {...}
}

Variables full details

Here you can find a detailed description of each variable or sub-branch:

VarTypeDescription
idintCurrent cart session id
referencestringInternal unique order reference/code
cart_idintInternal unique cart ID which caused this order
lang_idstringISO-CODE of the user language
availability_modestringInternal logic for order splitting
currencyobjectThe currenct currency object;
see Object: "currency"
totalstringFinal total for the current cart
total_cart_discountstringAmount of the "cart_discount" for the current cart
total_discountstringAmount of the "discount" for the current cart
total_taxesstringTotal taxes for the current cart
total_productsstringTotal for all products (without reductions)
total_shipmentstringShipment extra charge
total_paymentstringPayment extra charge

Object: "currency"

This object holds informations about a currency, and it is always defined with these variables:

VarTypeDescription
idintUnique id
namestringTranslated description
iso_codestringUniversal ISO-CODE(3)

Released under the MIT License.