ProdCloud API - BasketEvaluate service

Le service BasketEvaluate permet l'évaluation des modes d’expédition d’un panier.

  • Resource URL : /basket-evaluate/
  • HTTP method : POST
  • Argument : basket
  • Exemple de "basket" :
  • {
      "basket_reference": "ABC456",
      "destination_country_code": "FR",
      "destination_zip_code": "83400",
      "currency_code": "USD",
      "items": [
        {
          "item_reference": "AB1",
          "product_reference": "MUG",
          "quantity": 2,
          "options": [
            {
              "product_reference": "BAGINNERRED",
              "quantity": 2
            }
          ]
        },
        {
          "item_reference": "AB2",
          "product_reference": "GALAXYS5",
          "quantity": 3,
          "options": [
    
          ]
        }
      ]
    }
            
  • Exemple retour :
    {
      "basket_reference": "ABC456",
      "currency_code": "USD",
      "destination_country_code": "FR",
      "destination_zip_code": "83400",
      "deliveries": [
        {
          "production_unit_reference": "ByKaZa",
          "items": [
            {
              "reference": "AB1",
              "quantity": 2,
              "product_reference": "MUG",
              "options": [
    
              ]
            }
          ],
          "available_shipping": [
            {
              "shipping_reference": "LettreVerte",
              "cost_amount": 3.98,
              "price_amount": 3.69,
              "min_delay": 5,
              "max_delay": 7
            },
            {
              "shipping_reference": "ColissimoFr",
              "cost_amount": 5.55,
              "price_amount": 5.15,
              "min_delay": 2,
              "max_delay": 3
            },
            {
              "shipping_reference": "Chrono13",
              "cost_amount": 11.61,
              "price_amount": 10.76,
              "min_delay": 1,
              "max_delay": 2
            }
          ]
        },
        {
          "production_unit_reference": "TonDesignTaDeco",
          "items": [
            {
              "reference": "AB2",
              "quantity": 3,
              "product_reference": "GALAXYS5",
              "options": [
    
              ]
            }
          ],
          "available_shipping": [
            {
              "shipping_reference": "LettreVerte",
              "cost_amount": 2.93,
              "price_amount": 2.72,
              "min_delay": 5,
              "max_delay": 7
            }
          ]
        }
      ],
      "_links": {
        "self": {
          "href": "http:\/\/localhost:3007\/basket-evaluate"
        }
      }
    }
                
  • Exemple de tests unitaires sur demande