Add products to order - celdotro/marketplace GitHub Wiki

About

  • Add new products to an existing order

Class

celmarket\Orders\OrdersUpdate

Method

addProductsToOrder

API

  • method: orders
  • action: addProductsToOrder

Parameters

  • order = order's ID
  • arrProducts = array containg the model of products to be added -> array
    • (element din array) = the model a of product to be added

Response

An object with the following attributes

  • success = the operation was successful
    • 1 produs a fost adaugat = successfully added one product
    • X produse au fost adaugate = successfully added X products

Example - PHP

https://github.com/celdotro/marketplace_examples/blob/master/Orders/7.addProductsToOrder.php

Example - JSON

{
  "request": {
   "order": 1,
   "arrProducts": [
    "X"
   ]
  },
  
  "response": {
    "success": 1
  }
}
⚠️ **GitHub.com Fallback** ⚠️